home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / mac / Technical Documentation / Develop / develop Issue 23 / develop Issue 23 code / Multipane Dialogs Code.sea / Multipane Dialogs Code / ListControl.h < prev    next >
MacBinary  |  1995-01-26  |  32.9 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jan 26 19:39:39 1995, modified Thu Jan 26 19:39:39 1995, creator 'MMCC', type ASCII, 32903 bytes "ListControl.h" magic text fragment for file(1) cmd, 1st line "#ifndef __LISTCONTROL__", 2nd line "#define __LISTCONTROL__", 3rd line "", 4th line "#ifndef __TYPES__", 5th line "#include <Types.h>", at 0x8107 456 bytes resource magic text fragment for file(1) cmd, 1st line "#ifndef __LISTCONTROL__", 2nd line "#define __LISTCONTROL__", 3rd line "", 4th line "#ifndef __TYPES__", 5th line "#include <Types.h>" default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 4c 69 73 74 43 6f | 6e 74 72 6f 6c 2e 68 00 |..ListCo|ntrol.h.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 80 87 00 | 00 01 c8 ab 4d f1 4b ab |........|....M.K.|
|00000060| 4d f1 4b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |M.K.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 67 62 00 00 |........|....gb..|
|00000080| 23 69 66 6e 64 65 66 20 | 5f 5f 4c 49 53 54 43 4f |#ifndef |__LISTCO|
|00000090| 4e 54 52 4f 4c 5f 5f 0d | 23 64 65 66 69 6e 65 20 |NTROL__.|#define |
|000000a0| 5f 5f 4c 49 53 54 43 4f | 4e 54 52 4f 4c 5f 5f 0d |__LISTCO|NTROL__.|
|000000b0| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 54 59 50 45 53 |.#ifndef| __TYPES|
|000000c0| 5f 5f 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 79 70 |__.#incl|ude <Typ|
|000000d0| 65 73 2e 68 3e 0d 23 65 | 6e 64 69 66 0d 0d 23 69 |es.h>.#e|ndif..#i|
|000000e0| 66 6e 64 65 66 20 5f 5f | 4c 49 53 54 53 5f 5f 0d |fndef __|LISTS__.|
|000000f0| 23 69 6e 63 6c 75 64 65 | 20 3c 4c 69 73 74 73 2e |#include| <Lists.|
|00000100| 68 3e 0d 23 65 6e 64 69 | 66 0d 0d 23 69 66 6e 64 |h>.#endi|f..#ifnd|
|00000110| 65 66 20 5f 5f 57 49 4e | 44 4f 57 53 5f 5f 0d 23 |ef __WIN|DOWS__.#|
|00000120| 69 6e 63 6c 75 64 65 20 | 3c 57 69 6e 64 6f 77 73 |include |<Windows|
|00000130| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 74 79 70 65 |.h>.#end|if..type|
|00000140| 64 65 66 20 76 6f 69 64 | 09 28 2a 43 4c 47 65 74 |def void|.(*CLGet|
|00000150| 43 6f 6d 70 61 72 65 44 | 61 74 61 50 72 6f 63 50 |CompareD|ataProcP|
|00000160| 74 72 29 28 76 6f 69 64 | 20 2a 73 72 63 2c 20 73 |tr)(void| *src, s|
|00000170| 68 6f 72 74 20 73 72 63 | 6c 65 6e 2c 20 76 6f 69 |hort src|len, voi|
|00000180| 64 20 2a 64 73 74 2c 20 | 73 68 6f 72 74 20 2a 64 |d *dst, |short *d|
|00000190| 73 74 6c 65 6e 29 3b 0d | 74 79 70 65 64 65 66 20 |stlen);.|typedef |
|000001a0| 73 68 6f 72 74 09 28 2a | 43 4c 44 6f 43 6f 6d 70 |short.(*|CLDoComp|
|000001b0| 61 72 65 44 61 74 61 50 | 72 6f 63 50 74 72 29 28 |areDataP|rocPtr)(|
|000001c0| 76 6f 69 64 20 2a 70 74 | 72 61 2c 20 76 6f 69 64 |void *pt|ra, void|
|000001d0| 20 2a 70 74 72 62 2c 20 | 73 68 6f 72 74 20 6c 65 | *ptrb, |short le|
|000001e0| 6e 61 2c 20 73 68 6f 72 | 74 20 6c 65 6e 62 29 3b |na, shor|t lenb);|
|000001f0| 0d 74 79 70 65 64 65 66 | 20 42 6f 6f 6c 65 61 6e |.typedef| Boolean|
|00000200| 09 28 2a 43 4c 4b 65 79 | 46 69 6c 74 65 72 50 72 |.(*CLKey|FilterPr|
|00000210| 6f 63 50 74 72 29 28 4c | 69 73 74 48 61 6e 64 6c |ocPtr)(L|istHandl|
|00000220| 65 20 6c 69 73 74 2c 20 | 45 76 65 6e 74 52 65 63 |e list, |EventRec|
|00000230| 6f 72 64 20 2a 65 76 65 | 6e 74 29 3b 0d 0d 74 79 |ord *eve|nt);..ty|
|00000240| 70 65 64 65 66 20 73 74 | 72 75 63 74 20 43 4c 44 |pedef st|ruct CLD|
|00000250| 61 74 61 52 65 63 20 7b | 0d 09 73 68 6f 72 74 09 |ataRec {|..short.|
|00000260| 09 09 09 09 6d 6f 64 65 | 3b 0d 09 43 4c 47 65 74 |....mode|;..CLGet|
|00000270| 43 6f 6d 70 61 72 65 44 | 61 74 61 50 72 6f 63 50 |CompareD|ataProcP|
|00000280| 74 72 09 67 65 74 43 6f | 6d 70 61 72 65 44 61 74 |tr.getCo|mpareDat|
|00000290| 61 3b 0d 09 43 4c 44 6f | 43 6f 6d 70 61 72 65 44 |a;..CLDo|CompareD|
|000002a0| 61 74 61 50 72 6f 63 50 | 74 72 09 64 6f 43 6f 6d |ataProcP|tr.doCom|
|000002b0| 70 61 72 65 44 61 74 61 | 3b 0d 09 43 4c 4b 65 79 |pareData|;..CLKey|
|000002c0| 46 69 6c 74 65 72 50 72 | 6f 63 50 74 72 09 09 6b |FilterPr|ocPtr..k|
|000002d0| 65 79 46 69 6c 74 65 72 | 3b 0d 7d 20 43 4c 44 61 |eyFilter|;.} CLDa|
|000002e0| 74 61 52 65 63 3b 0d 74 | 79 70 65 64 65 66 20 43 |taRec;.t|ypedef C|
|000002f0| 4c 44 61 74 61 52 65 63 | 20 2a 43 4c 44 61 74 61 |LDataRec| *CLData|
|00000300| 50 74 72 2c 20 2a 2a 43 | 4c 44 61 74 61 48 6e 64 |Ptr, **C|LDataHnd|
|00000310| 6c 3b 0d 0d 0d 0d 23 69 | 66 64 65 66 20 5f 5f 63 |l;....#i|fdef __c|
|00000320| 70 6c 75 73 70 6c 75 73 | 0d 65 78 74 65 72 6e 20 |plusplus|.extern |
|00000330| 22 43 22 20 7b 0d 23 65 | 6e 64 69 66 0d 0d 0d 0d |"C" {.#e|ndif....|
|00000340| 76 6f 69 64 09 09 09 43 | 4c 41 63 74 69 76 61 74 |void...C|LActivat|
|00000350| 65 28 42 6f 6f 6c 65 61 | 6e 20 6d 61 6b 65 41 63 |e(Boolea|n makeAc|
|00000360| 74 69 76 65 2c 20 4c 69 | 73 74 48 61 6e 64 6c 65 |tive, Li|stHandle|
|00000370| 20 6c 69 73 74 48 6e 64 | 6c 29 3b 0d 09 2f 2a 0d | listHnd|l);../*.|
|00000380| 09 2a 2a 09 a6 20 43 68 | 61 6e 67 65 20 61 63 74 |.**.. Ch|ange act|
|00000390| 69 76 61 74 65 20 73 74 | 61 74 65 20 6f 66 20 6c |ivate st|ate of l|
|000003a0| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 20 74 6f 20 64 |ist cont|rol to d|
|000003b0| 65 73 69 67 6e 61 74 65 | 64 20 73 74 61 74 65 2e |esignate|d state.|
|000003c0| 0d 09 2a 2a 0d 09 2a 2a | 09 49 4e 50 55 54 3a 09 |..**..**|.INPUT:.|
|000003d0| 61 62 6f 76 65 4c 61 79 | 65 72 09 09 54 68 69 73 |aboveLay|er..This|
|000003e0| 20 69 73 20 74 68 65 20 | 6c 61 79 65 72 20 61 62 | is the |layer ab|
|000003f0| 6f 76 65 20 74 68 65 20 | 6c 61 79 65 72 20 74 6f |ove the |layer to|
|00000400| 20 63 72 65 61 74 65 2e | 0d 09 2a 2a 09 49 4e 50 | create.|..**.INP|
|00000410| 55 54 3a 09 6d 61 6b 65 | 41 63 74 69 76 65 3a 09 |UT:.make|Active:.|
|00000420| 09 74 72 75 65 20 74 6f | 20 6d 61 6b 65 20 74 68 |.true to| make th|
|00000430| 65 20 63 6f 6e 74 72 6f | 6c 20 74 68 65 20 61 63 |e contro|l the ac|
|00000440| 74 69 76 65 20 63 6f 6e | 74 72 6f 6c 2e 0d 09 2a |tive con|trol...*|
|00000450| 2a 09 09 09 09 09 09 09 | 66 61 6c 73 65 20 74 6f |*.......|false to|
|00000460| 20 69 6e 61 63 74 69 76 | 61 74 65 20 74 68 65 20 | inactiv|ate the |
|00000470| 63 6f 6e 74 72 6f 6c 2e | 0d 09 2a 2a 09 09 09 6c |control.|..**...l|
|00000480| 69 73 74 48 6e 64 6c 3a | 09 09 54 68 65 20 6c 69 |istHndl:|..The li|
|00000490| 73 74 20 74 6f 20 61 63 | 74 69 76 61 74 65 20 6f |st to ac|tivate o|
|000004a0| 72 20 64 65 61 63 74 69 | 76 61 74 65 2e 0d 09 2a |r deacti|vate...*|
|000004b0| 2a 0d 09 2a 2a 09 41 63 | 74 69 76 61 74 65 20 74 |*..**.Ac|tivate t|
|000004c0| 68 69 73 20 4c 69 73 74 | 20 72 65 63 6f 72 64 2e |his List| record.|
|000004d0| 20 20 41 63 74 69 76 61 | 74 69 6f 6e 20 69 73 20 | Activa|tion is |
|000004e0| 6e 6f 74 20 64 6f 6e 65 | 20 62 79 20 63 61 6c 6c |not done| by call|
|000004f0| 69 6e 67 20 4c 41 63 74 | 69 76 61 74 65 2e 20 20 |ing LAct|ivate. |
|00000500| 54 68 65 20 61 63 74 69 | 76 65 0d 09 2a 2a 09 63 |The acti|ve..**.c|
|00000510| 6f 6e 74 72 6f 6c 20 69 | 73 20 69 6e 64 69 63 61 |ontrol i|s indica|
|00000520| 74 65 64 20 62 79 20 74 | 68 65 20 32 2d 70 69 78 |ted by t|he 2-pix|
|00000530| 65 6c 20 74 68 69 63 6b | 20 62 6f 72 64 65 72 20 |el thick| border |
|00000540| 61 72 6f 75 6e 64 20 74 | 68 65 20 4c 69 73 74 20 |around t|he List |
|00000550| 63 6f 6e 74 72 6f 6c 2e | 20 20 54 68 69 73 20 61 |control.| This a|
|00000560| 6c 6c 6f 77 73 0d 09 2a | 2a 09 61 6c 6c 20 4c 69 |llows..*|*.all Li|
|00000570| 73 74 20 63 6f 6e 74 72 | 6f 6c 73 20 69 6e 20 61 |st contr|ols in a|
|00000580| 20 77 69 6e 64 6f 77 20 | 74 6f 20 64 69 73 70 6c | window |to displ|
|00000590| 61 79 20 77 68 69 63 68 | 20 63 65 6c 6c 73 20 61 |ay which| cells a|
|000005a0| 72 65 20 73 65 6c 65 63 | 74 65 64 2e 20 20 54 68 |re selec|ted. Th|
|000005b0| 69 73 20 62 65 68 61 76 | 69 6f 72 20 63 61 6e 0d |is behav|ior can.|
|000005c0| 09 2a 2a 09 62 65 20 6f | 76 65 72 72 69 64 64 65 |.**.be o|verridde|
|000005d0| 6e 20 62 79 20 63 61 6c | 6c 69 6e 67 20 4c 41 63 |n by cal|ling LAc|
|000005e0| 74 69 76 61 74 65 20 6f | 6e 20 74 68 65 20 4c 69 |tivate o|n the Li|
|000005f0| 73 74 20 72 65 63 6f 72 | 64 20 66 6f 72 20 4c 69 |st recor|d for Li|
|00000600| 73 74 20 63 6f 6e 74 72 | 6f 6c 73 2e 0d 09 2a 2a |st contr|ols...**|
|00000610| 0d 09 2a 2a 09 48 75 6d | 61 6e 20 69 6e 74 65 72 |..**.Hum|an inter|
|00000620| 66 61 63 65 20 64 69 63 | 74 61 74 65 73 20 74 68 |face dic|tates th|
|00000630| 61 74 20 61 74 20 6d 6f | 73 74 20 6f 6e 6c 79 20 |at at mo|st only |
|00000640| 61 20 73 69 6e 67 6c 65 | 20 4c 69 73 74 20 63 6f |a single| List co|
|00000650| 6e 74 72 6f 6c 20 68 61 | 73 20 74 68 69 73 20 61 |ntrol ha|s this a|
|00000660| 63 74 69 76 65 20 62 6f | 72 64 65 72 2e 0d 09 2a |ctive bo|rder...*|
|00000670| 2a 09 46 6f 72 20 74 68 | 69 73 20 72 65 61 73 6f |*.For th|is reaso|
|00000680| 6e 2c 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |n, this |function|
|00000690| 20 73 63 61 6e 73 20 66 | 6f 72 20 6f 74 68 65 72 | scans f|or other|
|000006a0| 20 4c 69 73 74 20 63 6f | 6e 74 72 6f 6c 73 20 69 | List co|ntrols i|
|000006b0| 6e 20 74 68 65 20 77 69 | 6e 64 6f 77 20 61 6e 64 |n the wi|ndow and|
|000006c0| 20 72 65 6d 6f 76 65 73 | 0d 09 2a 2a 09 74 68 65 | removes|..**.the|
|000006d0| 20 62 6f 72 64 65 72 20 | 66 72 6f 6d 20 61 6e 79 | border |from any|
|000006e0| 20 6f 74 68 65 72 20 74 | 68 61 74 20 69 74 20 66 | other t|hat it f|
|000006f0| 69 6e 64 73 2e 20 2a 2f | 0d 0d 42 6f 6f 6c 65 61 |inds. */|..Boolea|
|00000700| 6e 09 09 09 43 4c 43 6c | 69 63 6b 28 57 69 6e 64 |n...CLCl|ick(Wind|
|00000710| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 20 45 76 |owPtr wi|ndow, Ev|
|00000720| 65 6e 74 52 65 63 6f 72 | 64 20 2a 65 76 65 6e 74 |entRecor|d *event|
|00000730| 2c 20 73 68 6f 72 74 20 | 2a 61 63 74 69 6f 6e 29 |, short |*action)|
|00000740| 3b 0d 09 2f 2a 0d 09 2a | 2a 09 a6 20 48 61 6e 64 |;../*..*|*.. Hand|
|00000750| 6c 65 20 61 20 6d 6f 75 | 73 65 44 6f 77 6e 20 66 |le a mou|seDown f|
|00000760| 6f 72 20 61 20 6c 69 73 | 74 20 63 6f 6e 74 72 6f |or a lis|t contro|
|00000770| 6c 2e 0d 09 2a 2a 0d 09 | 2a 2a 09 49 4e 50 55 54 |l...**..|**.INPUT|
|00000780| 3a 09 77 69 6e 64 6f 77 | 09 09 54 68 65 20 77 69 |:.window|..The wi|
|00000790| 6e 64 6f 77 20 74 6f 20 | 63 68 65 63 6b 20 66 6f |ndow to |check fo|
|000007a0| 72 20 61 20 4c 69 73 74 | 20 63 6f 6e 74 72 6f 6c |r a List| control|
|000007b0| 20 63 6c 69 63 6b 20 69 | 6e 2e 0d 09 2a 2a 09 09 | click i|n...**..|
|000007c0| 09 65 76 65 6e 74 09 09 | 54 68 65 20 6d 6f 75 73 |.event..|The mous|
|000007d0| 65 44 6f 77 6e 20 65 76 | 65 6e 74 2e 0d 09 2a 2a |eDown ev|ent...**|
|000007e0| 09 4f 55 54 50 55 54 3a | 09 61 63 74 69 6f 6e 09 |.OUTPUT:|.action.|
|000007f0| 09 50 6f 69 6e 74 65 72 | 20 74 6f 20 61 20 73 68 |.Pointer| to a sh|
|00000800| 6f 72 74 20 74 6f 20 68 | 6f 6c 64 20 74 68 65 20 |ort to h|old the |
|00000810| 72 65 73 75 6c 74 69 6e | 67 20 61 63 74 69 6f 6e |resultin|g action|
|00000820| 2e 0d 09 2a 2a 09 09 09 | 09 09 09 50 61 73 73 20 |...**...|...Pass |
|00000830| 69 6e 20 6e 69 6c 20 69 | 66 20 79 6f 75 20 64 6f |in nil i|f you do|
|00000840| 6e 27 74 20 63 61 72 65 | 2e 0d 09 2a 2a 09 09 09 |n't care|...**...|
|00000850| 09 09 09 09 49 66 20 30 | 20 72 65 74 75 72 6e 65 |....If 0| returne|
|00000860| 64 3a 09 4e 6f 20 61 63 | 74 69 6f 6e 20 74 61 6b |d:.No ac|tion tak|
|00000870| 65 6e 2e 0d 09 2a 2a 09 | 09 09 09 09 09 09 49 66 |en...**.|......If|
|00000880| 20 31 20 72 65 74 75 72 | 6e 65 64 3a 09 54 68 65 | 1 retur|ned:.The|
|00000890| 20 61 63 74 69 76 65 20 | 6c 69 73 74 20 63 6f 6e | active |list con|
|000008a0| 74 72 6f 6c 20 75 73 65 | 64 20 74 68 65 20 63 6c |trol use|d the cl|
|000008b0| 69 63 6b 2e 0d 09 2a 2a | 09 09 09 09 09 09 09 49 |ick...**|.......I|
|000008c0| 66 20 2d 31 20 72 65 74 | 75 72 6e 65 64 3a 09 41 |f -1 ret|urned:.A|
|000008d0| 20 6e 65 77 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f | new Lis|t contro|
|000008e0| 6c 20 77 61 73 20 61 63 | 74 69 76 61 74 65 64 0d |l was ac|tivated.|
|000008f0| 09 2a 2a 09 09 09 09 09 | 09 09 09 09 09 09 28 61 |.**.....|......(a|
|00000900| 6e 64 20 74 68 65 20 6f | 6c 64 20 6f 6e 65 20 64 |nd the o|ld one d|
|00000910| 65 61 63 74 69 76 61 74 | 65 64 2e 29 0d 09 2a 2a |eactivat|ed.)..**|
|00000920| 09 52 45 53 55 4c 54 3a | 09 42 6f 6f 6c 65 61 6e |.RESULT:|.Boolean|
|00000930| 09 09 54 72 75 65 20 69 | 66 20 61 20 4c 69 73 74 |..True i|f a List|
|00000940| 20 63 6f 6e 74 72 6f 6c | 20 75 73 65 64 20 74 68 | control| used th|
|00000950| 65 20 65 76 65 6e 74 2e | 0d 09 2a 2a 0d 09 2a 2a |e event.|..**..**|
|00000960| 09 54 68 69 73 20 69 73 | 20 63 61 6c 6c 65 64 20 |.This is| called |
|00000970| 77 68 65 6e 20 61 20 6d | 6f 75 73 65 44 6f 77 6e |when a m|ouseDown|
|00000980| 20 6f 63 63 75 72 73 20 | 69 6e 20 74 68 65 20 63 | occurs |in the c|
|00000990| 6f 6e 74 65 6e 74 20 6f | 66 20 61 20 77 69 6e 64 |ontent o|f a wind|
|000009a0| 6f 77 2e 20 20 49 74 20 | 72 65 74 75 72 6e 73 20 |ow. It |returns |
|000009b0| 74 72 75 65 20 69 66 20 | 74 68 65 0d 09 2a 2a 09 |true if |the..**.|
|000009c0| 6d 6f 75 73 65 44 6f 77 | 6e 20 63 61 75 73 65 64 |mouseDow|n caused|
|000009d0| 20 61 20 4c 69 73 74 20 | 61 63 74 69 6f 6e 20 74 | a List |action t|
|000009e0| 6f 20 6f 63 63 75 72 2e | 20 20 45 76 65 6e 74 73 |o occur.| Events|
|000009f0| 20 74 68 61 74 20 61 72 | 65 20 68 61 6e 64 6c 65 | that ar|e handle|
|00000a00| 64 20 69 6e 63 6c 75 64 | 65 20 69 66 20 74 68 65 |d includ|e if the|
|00000a10| 20 75 73 65 72 0d 09 2a | 2a 09 63 6c 69 63 6b 73 | user..*|*.clicks|
|00000a20| 20 6f 6e 20 61 20 73 63 | 72 6f 6c 6c 62 61 72 20 | on a sc|rollbar |
|00000a30| 74 68 61 74 20 69 73 20 | 61 73 73 6f 63 69 61 74 |that is |associat|
|00000a40| 65 64 20 77 69 74 68 20 | 61 20 4c 69 73 74 20 63 |ed with |a List c|
|00000a50| 6f 6e 74 72 6f 6c 2e 20 | 2a 2f 0d 0d 43 6f 6e 74 |ontrol. |*/..Cont|
|00000a60| 72 6f 6c 48 61 6e 64 6c | 65 09 43 4c 43 74 6c 48 |rolHandl|e.CLCtlH|
|00000a70| 69 74 28 76 6f 69 64 29 | 3b 0d 09 2f 2a 0d 09 2a |it(void)|;../*..*|
|00000a80| 2a 09 a6 20 52 65 74 75 | 72 6e 20 4c 69 73 74 20 |*.. Retu|rn List |
|00000a90| 63 6f 6e 74 72 6f 6c 20 | 74 68 61 74 20 77 61 73 |control |that was|
|00000aa0| 20 66 6f 75 6e 64 20 62 | 79 20 6c 61 73 74 20 63 | found b|y last c|
|00000ab0| 61 6c 6c 20 74 6f 20 46 | 69 6e 64 43 6f 6e 74 72 |all to F|indContr|
|00000ac0| 6f 6c 2e 0d 09 2a 2a 0d | 09 2a 2a 09 52 45 53 55 |ol...**.|.**.RESU|
|00000ad0| 4c 54 3a 09 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |LT:.Cont|rolHandl|
|00000ae0| 65 0d 09 2a 2a 0d 09 2a | 2a 09 54 68 65 20 4c 69 |e..**..*|*.The Li|
|00000af0| 73 74 20 63 6f 6e 74 72 | 6f 6c 20 74 68 61 74 20 |st contr|ol that |
|00000b00| 77 61 73 20 68 69 74 20 | 62 79 20 63 61 6c 6c 69 |was hit |by calli|
|00000b10| 6e 67 20 46 69 6e 64 43 | 6f 6e 74 72 6f 6c 20 69 |ng FindC|ontrol i|
|00000b20| 73 20 73 61 76 65 64 20 | 69 6e 20 61 20 67 6c 6f |s saved |in a glo|
|00000b30| 62 61 6c 20 76 61 72 69 | 61 62 6c 65 2c 20 73 69 |bal vari|able, si|
|00000b40| 6e 63 65 0d 09 2a 2a 09 | 74 68 65 20 43 44 45 46 |nce..**.|the CDEF|
|00000b50| 20 68 61 73 20 6e 6f 20 | 77 61 79 20 6f 66 20 72 | has no |way of r|
|00000b60| 65 74 75 72 6e 69 6e 67 | 20 77 68 61 74 20 6b 69 |eturning| what ki|
|00000b70| 6e 64 20 69 74 20 77 61 | 73 2e 20 20 54 6f 20 64 |nd it wa|s. To d|
|00000b80| 65 74 65 72 6d 69 6e 65 | 20 74 68 61 74 20 69 74 |etermine| that it|
|00000b90| 20 77 61 73 20 61 20 4c | 69 73 74 20 63 6f 6e 74 | was a L|ist cont|
|00000ba0| 72 6f 6c 0d 09 2a 2a 09 | 74 68 61 74 20 77 61 73 |rol..**.|that was|
|00000bb0| 20 68 69 74 2c 20 66 69 | 72 73 74 20 63 61 6c 6c | hit, fi|rst call|
|00000bc0| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 2e 20 | this fu|nction. |
|00000bd0| 20 54 68 65 20 66 69 72 | 73 74 20 63 61 6c 6c 20 | The fir|st call |
|00000be0| 72 65 74 75 72 6e 73 20 | 74 68 65 20 6f 6c 64 20 |returns |the old |
|00000bf0| 76 61 6c 75 65 20 69 6e | 20 74 68 65 20 67 6c 6f |value in| the glo|
|00000c00| 62 61 6c 0d 09 2a 2a 09 | 76 61 72 69 61 62 6c 65 |bal..**.|variable|
|00000c10| 2c 20 70 6c 75 73 20 69 | 74 20 72 65 73 65 74 73 |, plus i|t resets|
|00000c20| 20 74 68 65 20 67 6c 6f | 62 61 6c 20 74 6f 20 6e | the glo|bal to n|
|00000c30| 69 6c 2e 20 20 54 68 65 | 6e 20 63 61 6c 6c 20 46 |il. The|n call F|
|00000c40| 69 6e 64 43 6f 6e 74 72 | 6f 6c 2c 20 61 6e 64 20 |indContr|ol, and |
|00000c50| 74 68 65 6e 20 63 61 6c | 6c 20 74 68 69 73 0d 09 |then cal|l this..|
|00000c60| 2a 2a 09 66 75 6e 63 74 | 69 6f 6e 20 61 67 61 69 |**.funct|ion agai|
|00000c70| 6e 2e 20 20 49 66 20 69 | 74 20 72 65 74 75 72 6e |n. If i|t return|
|00000c80| 73 20 6e 69 6c 2c 20 74 | 68 65 6e 20 61 20 4c 69 |s nil, t|hen a Li|
|00000c90| 73 74 20 63 6f 6e 74 72 | 6f 6c 20 77 61 73 6e 27 |st contr|ol wasn'|
|00000ca0| 74 20 68 69 74 2e 20 20 | 49 66 20 69 74 20 72 65 |t hit. |If it re|
|00000cb0| 74 75 72 6e 73 20 6e 6f | 6e 2d 6e 69 6c 2c 0d 09 |turns no|n-nil,..|
|00000cc0| 2a 2a 09 74 68 65 6e 20 | 69 74 20 77 61 73 20 61 |**.then |it was a|
|00000cd0| 20 4c 69 73 74 20 63 6f | 6e 74 72 6f 6c 20 74 68 | List co|ntrol th|
|00000ce0| 61 74 20 77 61 73 20 68 | 69 74 2c 20 61 6e 64 20 |at was h|it, and |
|00000cf0| 73 70 65 63 69 66 69 63 | 61 6c 6c 79 20 74 68 65 |specific|ally the|
|00000d00| 20 6f 6e 65 20 72 65 74 | 75 72 6e 65 64 2e 20 2a | one ret|urned. *|
|00000d10| 2f 0d 0d 42 6f 6f 6c 65 | 61 6e 09 09 09 43 4c 45 |/..Boole|an...CLE|
|00000d20| 76 65 6e 74 28 57 69 6e | 64 6f 77 50 74 72 20 77 |vent(Win|dowPtr w|
|00000d30| 69 6e 64 6f 77 2c 20 45 | 76 65 6e 74 52 65 63 6f |indow, E|ventReco|
|00000d40| 72 64 20 2a 65 76 65 6e | 74 2c 20 73 68 6f 72 74 |rd *even|t, short|
|00000d50| 20 2a 61 63 74 69 6f 6e | 29 3b 0d 09 2f 2a 0d 09 | *action|);../*..|
|00000d60| 2a 2a 09 a6 20 48 61 6e | 64 6c 65 20 74 68 65 20 |**.. Han|dle the |
|00000d70| 65 76 65 6e 74 20 69 66 | 20 69 74 20 61 70 70 6c |event if| it appl|
|00000d80| 69 65 73 20 74 6f 20 74 | 68 65 20 61 63 74 69 76 |ies to t|he activ|
|00000d90| 65 20 4c 69 73 74 20 63 | 6f 6e 74 72 6f 6c 2e 0d |e List c|ontrol..|
|00000da0| 09 2a 2a 0d 09 2a 2a 09 | 49 4e 50 55 54 3a 09 77 |.**..**.|INPUT:.w|
|00000db0| 69 6e 64 6f 77 09 09 54 | 68 65 20 77 69 6e 64 6f |indow..T|he windo|
|00000dc0| 77 20 74 68 65 20 65 76 | 65 6e 74 20 73 68 6f 75 |w the ev|ent shou|
|00000dd0| 6c 64 20 62 65 20 70 72 | 6f 63 65 73 73 65 64 20 |ld be pr|ocessed |
|00000de0| 69 6e 2e 0d 09 2a 2a 09 | 09 09 65 76 65 6e 74 09 |in...**.|..event.|
|00000df0| 09 54 68 65 20 65 76 65 | 6e 74 20 74 6f 20 62 65 |.The eve|nt to be|
|00000e00| 20 70 72 6f 63 65 73 73 | 65 64 2e 0d 09 2a 2a 09 | process|ed...**.|
|00000e10| 09 09 61 63 74 69 6f 6e | 3a 09 09 55 73 65 64 20 |..action|:..Used |
|00000e20| 74 6f 20 72 65 74 75 72 | 6e 20 74 68 65 20 61 63 |to retur|n the ac|
|00000e30| 74 69 6f 6e 20 74 61 6b | 65 6e 20 62 79 20 43 4c |tion tak|en by CL|
|00000e40| 43 6c 69 63 6b 2e 0d 09 | 2a 2a 09 09 09 09 09 09 |Click...|**......|
|00000e50| 50 61 73 73 20 69 6e 20 | 6e 69 6c 20 69 66 20 79 |Pass in |nil if y|
|00000e60| 6f 75 20 64 6f 6e 27 74 | 20 63 61 72 65 2e 0d 09 |ou don't| care...|
|00000e70| 2a 2a 09 09 09 09 09 09 | 46 6f 72 20 63 6c 69 63 |**......|For clic|
|00000e80| 6b 20 65 76 65 6e 74 73 | 3a 0d 09 2a 2a 09 09 09 |k events|:..**...|
|00000e90| 09 09 09 09 49 66 20 30 | 20 72 65 74 75 72 6e 65 |....If 0| returne|
|00000ea0| 64 3a 09 4e 6f 20 61 63 | 74 69 6f 6e 20 74 61 6b |d:.No ac|tion tak|
|00000eb0| 65 6e 2e 0d 09 2a 2a 09 | 09 09 09 09 09 09 49 66 |en...**.|......If|
|00000ec0| 20 31 20 72 65 74 75 72 | 6e 65 64 3a 09 54 68 65 | 1 retur|ned:.The|
|00000ed0| 20 61 63 74 69 76 65 20 | 6c 69 73 74 20 63 6f 6e | active |list con|
|00000ee0| 74 72 6f 6c 20 75 73 65 | 64 20 74 68 65 20 63 6c |trol use|d the cl|
|00000ef0| 69 63 6b 2e 0d 09 2a 2a | 09 09 09 09 09 09 09 49 |ick...**|.......I|
|00000f00| 66 20 2d 31 20 72 65 74 | 75 72 6e 65 64 3a 09 41 |f -1 ret|urned:.A|
|00000f10| 20 6e 65 77 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f | new Lis|t contro|
|00000f20| 6c 20 77 61 73 20 61 63 | 74 69 76 61 74 65 64 0d |l was ac|tivated.|
|00000f30| 09 2a 2a 09 09 09 09 09 | 09 09 09 09 09 09 28 61 |.**.....|......(a|
|00000f40| 6e 64 20 74 68 65 20 6f | 6c 64 20 6f 6e 65 20 64 |nd the o|ld one d|
|00000f50| 65 61 63 74 69 76 61 74 | 65 64 2e 29 0d 09 2a 2a |eactivat|ed.)..**|
|00000f60| 09 09 09 09 09 09 46 6f | 72 20 6b 65 79 20 65 76 |......Fo|r key ev|
|00000f70| 65 6e 74 73 3a 0d 09 2a | 2a 09 09 09 09 09 09 09 |ents:..*|*.......|
|00000f80| 49 66 20 30 20 72 65 74 | 75 72 6e 65 64 3a 09 20 |If 0 ret|urned:. |
|00000f90| 4e 6f 20 61 63 74 69 6f | 6e 20 74 61 6b 65 6e 2e |No actio|n taken.|
|00000fa0| 0d 09 2a 2a 09 09 09 09 | 09 09 09 49 66 20 31 20 |..**....|...If 1 |
|00000fb0| 72 65 74 75 72 6e 65 64 | 3a 09 20 4b 65 79 20 70 |returned|:. Key p|
|00000fc0| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 6f 63 63 75 72 |ositioni|ng occur|
|00000fd0| 65 64 20 6f 6e 20 74 68 | 65 20 61 63 74 69 76 65 |ed on th|e active|
|00000fe0| 20 63 6f 6e 74 72 6f 6c | 2e 0d 09 2a 2a 0d 09 2a | control|...**..*|
|00000ff0| 2a 09 52 45 53 55 4c 54 | 3a 09 42 6f 6f 6c 65 61 |*.RESULT|:.Boolea|
|00001000| 6e 09 09 54 72 75 65 20 | 69 66 20 61 20 4c 69 73 |n..True |if a Lis|
|00001010| 74 20 63 6f 6e 74 72 6f | 6c 20 75 73 65 64 20 74 |t contro|l used t|
|00001020| 68 65 20 65 76 65 6e 74 | 2e 0d 09 2a 2a 0d 09 2a |he event|...**..*|
|00001030| 2a 09 48 61 6e 64 6c 65 | 20 74 68 65 20 65 76 65 |*.Handle| the eve|
|00001040| 6e 74 20 69 66 20 69 74 | 20 61 70 70 6c 69 65 73 |nt if it| applies|
|00001050| 20 74 6f 20 74 68 65 20 | 61 63 74 69 76 65 20 4c | to the |active L|
|00001060| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 2e 20 20 49 66 |ist cont|rol. If|
|00001070| 20 73 6f 6d 65 20 61 63 | 74 69 6f 6e 20 6f 63 63 | some ac|tion occ|
|00001080| 75 72 65 64 20 64 75 65 | 0d 09 2a 2a 09 74 6f 20 |ured due|..**.to |
|00001090| 74 68 65 20 65 76 65 6e | 74 2c 20 72 65 74 75 72 |the even|t, retur|
|000010a0| 6e 20 74 72 75 65 2e 20 | 2a 2f 0d 0d 4c 69 73 74 |n true. |*/..List|
|000010b0| 48 61 6e 64 6c 65 09 09 | 43 4c 46 69 6e 64 41 63 |Handle..|CLFindAc|
|000010c0| 74 69 76 65 28 57 69 6e | 64 6f 77 50 74 72 20 77 |tive(Win|dowPtr w|
|000010d0| 69 6e 64 6f 77 29 3b 0d | 09 2f 2a 0d 09 2a 2a 09 |indow);.|./*..**.|
|000010e0| a6 20 52 65 74 75 72 6e | 73 20 74 68 65 20 61 63 |. Return|s the ac|
|000010f0| 74 69 76 65 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f |tive Lis|t contro|
|00001100| 6c 2c 20 69 66 20 61 6e | 79 2e 0d 09 2a 2a 0d 09 |l, if an|y...**..|
|00001110| 2a 2a 09 49 4e 50 55 54 | 3a 09 77 69 6e 64 6f 77 |**.INPUT|:.window|
|00001120| 09 09 54 68 65 20 77 69 | 6e 64 6f 77 20 74 6f 20 |..The wi|ndow to |
|00001130| 63 68 65 63 6b 20 66 6f | 72 20 61 6e 20 61 63 74 |check fo|r an act|
|00001140| 69 76 65 20 4c 69 73 74 | 20 63 6f 6e 74 72 6f 6c |ive List| control|
|00001150| 2e 0d 09 2a 2a 09 52 45 | 53 55 4c 54 3a 09 4c 69 |...**.RE|SULT:.Li|
|00001160| 73 74 48 61 6e 64 6c 65 | 09 54 68 65 20 61 63 74 |stHandle|.The act|
|00001170| 69 76 65 20 4c 69 73 74 | 20 63 6f 6e 74 72 6f 6c |ive List| control|
|00001180| 20 66 6f 75 6e 64 20 28 | 6e 69 6c 20 69 66 20 6e | found (|nil if n|
|00001190| 6f 6e 65 29 2e 0d 09 2a | 2a 0d 09 2a 2a 09 52 65 |one)...*|*..**.Re|
|000011a0| 74 75 72 6e 73 20 74 68 | 65 20 61 63 74 69 76 65 |turns th|e active|
|000011b0| 20 4c 69 73 74 20 63 6f | 6e 74 72 6f 6c 2c 20 69 | List co|ntrol, i|
|000011c0| 66 20 61 6e 79 2e 20 20 | 49 66 20 6e 69 6c 20 69 |f any. |If nil i|
|000011d0| 73 20 70 61 73 73 65 64 | 20 69 6e 2c 20 74 68 65 |s passed| in, the|
|000011e0| 6e 20 74 68 65 20 72 65 | 74 75 72 6e 20 76 61 6c |n the re|turn val|
|000011f0| 75 65 0d 09 2a 2a 09 72 | 65 70 72 65 73 65 6e 74 |ue..**.r|epresent|
|00001200| 73 20 77 68 61 74 65 76 | 65 72 20 4c 69 73 74 20 |s whatev|er List |
|00001210| 63 6f 6e 74 72 6f 6c 20 | 69 73 20 61 63 74 69 76 |control |is activ|
|00001220| 65 2c 20 69 6e 64 65 70 | 65 6e 64 65 6e 74 20 6f |e, indep|endent o|
|00001230| 66 20 77 68 61 74 20 77 | 69 6e 64 6f 77 20 69 74 |f what w|indow it|
|00001240| 20 69 73 20 69 6e 2e 20 | 20 49 66 20 61 0d 09 2a | is in. | If a..*|
|00001250| 2a 09 77 69 6e 64 6f 77 | 20 69 73 20 70 61 73 73 |*.window| is pass|
|00001260| 65 64 20 69 6e 2c 20 74 | 68 65 6e 20 69 74 20 72 |ed in, t|hen it r|
|00001270| 65 74 75 72 6e 73 20 61 | 20 4c 69 73 74 20 63 6f |eturns a| List co|
|00001280| 6e 74 72 6f 6c 20 6f 6e | 6c 79 20 69 66 20 74 68 |ntrol on|ly if th|
|00001290| 65 20 61 63 74 69 76 65 | 20 63 6f 6e 74 72 6f 6c |e active| control|
|000012a0| 20 69 73 20 69 6e 20 74 | 68 65 0d 09 2a 2a 09 73 | is in t|he..**.s|
|000012b0| 70 65 63 69 66 69 65 64 | 20 77 69 6e 64 6f 77 2e |pecified| window.|
|000012c0| 20 20 49 66 20 74 68 65 | 20 61 63 74 69 76 65 20 | If the| active |
|000012d0| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 20 69 73 20 |List con|trol is |
|000012e0| 69 6e 20 73 6f 6d 65 20 | 6f 74 68 65 72 20 77 69 |in some |other wi|
|000012f0| 6e 64 6f 77 2c 20 74 68 | 65 6e 20 6e 69 6c 0d 09 |ndow, th|en nil..|
|00001300| 2a 2a 09 69 73 20 72 65 | 74 75 72 6e 65 64 2e 20 |**.is re|turned. |
|00001310| 2a 2f 0d 0d 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |*/..Cont|rolHandl|
|00001320| 65 09 43 4c 46 69 6e 64 | 43 74 6c 28 57 69 6e 64 |e.CLFind|Ctl(Wind|
|00001330| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 20 45 76 |owPtr wi|ndow, Ev|
|00001340| 65 6e 74 52 65 63 6f 72 | 64 20 2a 65 76 65 6e 74 |entRecor|d *event|
|00001350| 2c 20 4c 69 73 74 48 61 | 6e 64 6c 65 20 2a 6c 69 |, ListHa|ndle *li|
|00001360| 73 74 48 6e 64 6c 2c 0d | 09 09 09 09 09 09 20 20 |stHndl,.|...... |
|00001370| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 20 2a 63 |ControlH|andle *c|
|00001380| 74 6c 48 69 74 29 3b 0d | 09 2f 2a 0d 09 2a 2a 09 |tlHit);.|./*..**.|
|00001390| a6 20 53 65 65 20 69 66 | 20 61 20 4c 69 73 74 20 |. See if| a List |
|000013a0| 63 6f 6e 74 72 6f 6c 20 | 6f 72 20 72 65 6c 61 74 |control |or relat|
|000013b0| 65 64 20 73 63 72 6f 6c | 6c 62 61 72 20 77 61 73 |ed scrol|lbar was|
|000013c0| 20 63 6c 69 63 6b 65 64 | 20 6f 6e 2e 0d 09 2a 2a | clicked| on...**|
|000013d0| 0d 09 2a 2a 09 49 4e 50 | 55 54 3a 09 77 69 6e 64 |..**.INP|UT:.wind|
|000013e0| 6f 77 09 09 09 54 68 65 | 20 77 69 6e 64 6f 77 20 |ow...The| window |
|000013f0| 74 6f 20 63 68 65 63 6b | 20 66 6f 72 20 61 20 68 |to check| for a h|
|00001400| 69 74 2e 0d 09 2a 2a 09 | 09 09 65 76 65 6e 74 09 |it...**.|..event.|
|00001410| 09 09 54 68 65 20 6d 6f | 75 73 65 44 6f 77 6e 20 |..The mo|useDown |
|00001420| 65 76 65 6e 74 20 74 6f | 20 68 69 74 2d 74 65 73 |event to| hit-tes|
|00001430| 74 20 77 69 74 68 2e 0d | 09 2a 2a 09 4f 55 54 50 |t with..|.**.OUTP|
|00001440| 55 54 3a 09 6c 69 73 74 | 48 6e 64 6c 09 09 54 68 |UT:.list|Hndl..Th|
|00001450| 65 20 6c 69 73 74 20 68 | 69 74 20 6f 6e 2c 20 6f |e list h|it on, o|
|00001460| 72 20 6e 69 6c 20 69 66 | 20 6e 6f 6e 65 20 68 69 |r nil if| none hi|
|00001470| 74 2e 0d 09 2a 2a 09 09 | 09 09 09 09 09 50 61 73 |t...**..|.....Pas|
|00001480| 73 20 69 6e 20 6e 69 6c | 20 69 66 20 79 6f 75 20 |s in nil| if you |
|00001490| 64 6f 6e d5 74 20 63 61 | 72 65 2e 0d 09 2a 2a 09 |don.t ca|re...**.|
|000014a0| 09 09 63 74 6c 48 69 74 | 09 09 09 54 68 65 20 63 |..ctlHit|...The c|
|000014b0| 6f 6e 74 72 6f 6c 20 68 | 69 74 20 6f 6e 2c 20 6f |ontrol h|it on, o|
|000014c0| 72 20 6e 69 6c 20 69 66 | 20 6e 6f 6e 65 20 68 69 |r nil if| none hi|
|000014d0| 74 2e 0d 09 2a 2a 09 09 | 09 09 09 09 09 50 61 73 |t...**..|.....Pas|
|000014e0| 73 20 69 6e 20 6e 69 6c | 20 69 66 20 79 6f 75 20 |s in nil| if you |
|000014f0| 64 6f 6e d5 74 20 63 61 | 72 65 2e 0d 09 2a 2a 09 |don.t ca|re...**.|
|00001500| 09 09 09 09 09 09 28 4e | 6f 74 65 20 74 68 61 74 |......(N|ote that|
|00001510| 20 74 68 65 20 63 6f 6e | 74 72 6f 6c 20 72 65 74 | the con|trol ret|
|00001520| 75 72 6e 65 64 20 68 65 | 72 65 20 6d 61 79 20 62 |urned he|re may b|
|00001530| 65 20 61 20 72 65 6c 61 | 74 65 64 20 73 63 72 6f |e a rela|ted scro|
|00001540| 6c 6c 62 61 72 2e 29 0d | 09 2a 2a 09 52 45 53 55 |llbar.).|.**.RESU|
|00001550| 4c 54 3a 09 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |LT:.Cont|rolHandl|
|00001560| 65 09 54 68 65 20 4c 69 | 73 74 20 63 6f 6e 74 72 |e.The Li|st contr|
|00001570| 6f 6c 20 68 69 74 2c 20 | 6f 72 20 6e 69 6c 20 66 |ol hit, |or nil f|
|00001580| 6f 72 20 6e 6f 6e 65 2e | 0d 09 2a 2a 0d 09 2a 2a |or none.|..**..**|
|00001590| 09 54 68 69 73 20 64 65 | 74 65 72 6d 69 6e 65 73 |.This de|termines|
|000015a0| 20 69 66 20 61 20 4c 69 | 73 74 20 63 6f 6e 74 72 | if a Li|st contr|
|000015b0| 6f 6c 20 77 61 73 20 63 | 6c 69 63 6b 65 64 20 6f |ol was c|licked o|
|000015c0| 6e 2c 20 6f 72 20 69 66 | 20 61 20 72 65 6c 61 74 |n, or if| a relat|
|000015d0| 65 64 20 73 63 72 6f 6c | 6c 62 61 72 20 77 61 73 |ed scrol|lbar was|
|000015e0| 0d 09 2a 2a 09 63 6c 69 | 63 6b 65 64 20 6f 6e 2e |..**.cli|cked on.|
|000015f0| 20 20 49 66 20 61 20 4c | 69 73 74 20 63 6f 6e 74 | If a L|ist cont|
|00001600| 72 6f 6c 20 6f 72 20 4c | 69 73 74 20 73 63 72 6f |rol or L|ist scro|
|00001610| 6c 6c 62 61 72 20 77 61 | 73 20 63 6c 69 63 6b 65 |llbar wa|s clicke|
|00001620| 64 20 6f 6e 2c 20 74 68 | 65 6e 20 74 72 75 65 20 |d on, th|en true |
|00001630| 69 73 20 72 65 74 75 72 | 6e 65 64 2c 0d 09 2a 2a |is retur|ned,..**|
|00001640| 09 61 73 20 77 65 6c 6c | 20 61 73 20 74 68 65 20 |.as well| as the |
|00001650| 4c 69 73 74 20 68 61 6e | 64 6c 65 20 61 6e 64 20 |List han|dle and |
|00001660| 74 68 65 20 68 61 6e 64 | 6c 65 20 74 6f 20 74 68 |the hand|le to th|
|00001670| 65 20 76 69 65 77 20 63 | 6f 6e 74 72 6f 6c 2e 20 |e view c|ontrol. |
|00001680| 2a 2f 0d 0d 4c 69 73 74 | 48 61 6e 64 6c 65 09 09 |*/..List|Handle..|
|00001690| 43 4c 46 72 6f 6d 53 63 | 72 6f 6c 6c 28 43 6f 6e |CLFromSc|roll(Con|
|000016a0| 74 72 6f 6c 48 61 6e 64 | 6c 65 20 73 63 72 6f 6c |trolHand|le scrol|
|000016b0| 6c 43 74 6c 2c 20 43 6f | 6e 74 72 6f 6c 48 61 6e |lCtl, Co|ntrolHan|
|000016c0| 64 6c 65 20 2a 72 65 74 | 43 74 6c 29 3b 0d 09 2f |dle *ret|Ctl);../|
|000016d0| 2a 0d 09 2a 2a 09 a6 20 | 46 69 6e 64 20 74 68 65 |*..**.. |Find the|
|000016e0| 20 4c 69 73 74 20 72 65 | 63 6f 72 64 20 74 68 61 | List re|cord tha|
|000016f0| 74 20 69 73 20 72 65 6c | 61 74 65 64 20 74 6f 20 |t is rel|ated to |
|00001700| 74 68 65 20 69 6e 64 69 | 63 61 74 65 64 20 73 63 |the indi|cated sc|
|00001710| 72 6f 6c 6c 62 61 72 2e | 0d 09 2a 2a 0d 09 2a 2a |rollbar.|..**..**|
|00001720| 09 49 4e 50 55 54 3a 09 | 73 63 72 6f 6c 6c 43 74 |.INPUT:.|scrollCt|
|00001730| 6c 09 09 54 68 65 20 73 | 63 72 6f 6c 6c 62 61 72 |l..The s|crollbar|
|00001740| 20 74 6f 20 6c 6f 6f 6b | 20 75 70 2e 0d 09 2a 2a | to look| up...**|
|00001750| 09 09 09 72 65 74 43 74 | 6c 09 09 09 54 68 65 20 |...retCt|l...The |
|00001760| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 20 68 61 6e |List con|trol han|
|00001770| 64 6c 65 2e 20 20 50 61 | 73 73 20 69 6e 20 6e 69 |dle. Pa|ss in ni|
|00001780| 6c 20 69 66 20 79 6f 75 | 20 64 6f 6e d5 74 20 63 |l if you| don.t c|
|00001790| 61 72 65 2e 0d 09 2a 2a | 09 52 45 53 55 4c 54 3a |are...**|.RESULT:|
|000017a0| 09 6c 69 73 74 48 6e 64 | 6c 09 09 54 68 65 20 6c |.listHnd|l..The l|
|000017b0| 69 73 74 20 72 65 6c 61 | 74 65 64 20 74 6f 20 74 |ist rela|ted to t|
|000017c0| 68 65 20 73 63 72 6f 6c | 6c 62 61 72 2e 0d 09 2a |he scrol|lbar...*|
|000017d0| 2a 0d 09 2a 2a 09 46 69 | 6e 64 20 74 68 65 20 4c |*..**.Fi|nd the L|
|000017e0| 69 73 74 20 72 65 63 6f | 72 64 20 74 68 61 74 20 |ist reco|rd that |
|000017f0| 69 73 20 72 65 6c 61 74 | 65 64 20 74 6f 20 74 68 |is relat|ed to th|
|00001800| 65 20 69 6e 64 69 63 61 | 74 65 64 20 73 63 72 6f |e indica|ted scro|
|00001810| 6c 6c 62 61 72 2e 20 2a | 2f 0d 0d 4c 69 73 74 48 |llbar. *|/..ListH|
|00001820| 61 6e 64 6c 65 09 09 43 | 4c 47 65 74 4c 69 73 74 |andle..C|LGetList|
|00001830| 28 57 69 6e 64 6f 77 50 | 74 72 20 77 69 6e 64 6f |(WindowP|tr windo|
|00001840| 77 2c 20 73 68 6f 72 74 | 20 6c 6e 75 6d 29 3b 0d |w, short| lnum);.|
|00001850| 09 2f 2a 0d 09 2a 2a 09 | a6 20 47 65 74 20 74 68 |./*..**.|. Get th|
|00001860| 65 20 4e 74 68 20 4c 69 | 73 74 20 63 6f 6e 74 72 |e Nth Li|st contr|
|00001870| 6f 6c 20 69 6e 20 74 68 | 65 20 63 6f 6e 74 72 6f |ol in th|e contro|
|00001880| 6c 20 6c 69 73 74 20 6f | 66 20 61 20 77 69 6e 64 |l list o|f a wind|
|00001890| 6f 77 2e 0d 09 2a 2a 0d | 09 2a 2a 09 49 4e 50 55 |ow...**.|.**.INPU|
|000018a0| 54 3a 09 77 69 6e 64 6f | 77 09 09 54 68 65 20 77 |T:.windo|w..The w|
|000018b0| 69 6e 64 6f 77 20 77 68 | 6f 73 65 20 63 6f 6e 74 |indow wh|ose cont|
|000018c0| 72 6f 6c 20 6c 69 73 74 | 20 69 73 20 74 6f 20 62 |rol list| is to b|
|000018d0| 65 20 73 63 61 6e 6e 65 | 64 2e 0d 09 2a 2a 09 09 |e scanne|d...**..|
|000018e0| 09 6c 6e 75 6d 09 09 54 | 68 65 20 6c 69 73 74 20 |.lnum..T|he list |
|000018f0| 6e 75 6d 62 65 72 20 74 | 6f 20 72 65 74 75 72 6e |number t|o return|
|00001900| 2e 0d 09 2a 2a 09 52 45 | 53 55 4c 54 3a 09 6c 69 |...**.RE|SULT:.li|
|00001910| 73 74 48 6e 64 6c 09 54 | 68 65 20 4e 74 68 20 6c |stHndl.T|he Nth l|
|00001920| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 20 69 6e 20 74 |ist cont|rol in t|
|00001930| 68 65 20 77 69 6e 64 6f | 77 20 6c 69 73 74 2e 0d |he windo|w list..|
|00001940| 09 2a 2a 0d 09 2a 2a 09 | 47 65 74 20 74 68 65 20 |.**..**.|Get the |
|00001950| 4e 74 68 20 4c 69 73 74 | 20 63 6f 6e 74 72 6f 6c |Nth List| control|
|00001960| 20 69 6e 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 | in the |control |
|00001970| 6c 69 73 74 20 6f 66 20 | 61 20 77 69 6e 64 6f 77 |list of |a window|
|00001980| 2e 20 2a 2f 0d 0d 73 68 | 6f 72 74 09 09 09 43 4c |. */..sh|ort...CL|
|00001990| 49 6e 73 65 72 74 28 4c | 69 73 74 48 61 6e 64 6c |Insert(L|istHandl|
|000019a0| 65 20 6c 69 73 74 48 6e | 64 6c 2c 20 63 68 61 72 |e listHn|dl, char|
|000019b0| 20 2a 64 61 74 61 2c 20 | 73 68 6f 72 74 20 64 61 | *data, |short da|
|000019c0| 74 61 4c 65 6e 2c 20 73 | 68 6f 72 74 20 72 6f 77 |taLen, s|hort row|
|000019d0| 2c 20 73 68 6f 72 74 20 | 63 6f 6c 29 3b 0d 09 2f |, short |col);../|
|000019e0| 2a 0d 09 2a 2a 09 a6 20 | 49 6e 73 65 72 74 20 61 |*..**.. |Insert a|
|000019f0| 20 63 65 6c 6c 20 61 6c | 70 68 61 62 65 74 69 63 | cell al|phabetic|
|00001a00| 61 6c 6c 79 20 69 6e 74 | 6f 20 74 68 65 20 6c 69 |ally int|o the li|
|00001a10| 73 74 2e 0d 09 2a 2a 0d | 09 2a 2a 09 49 4e 50 55 |st...**.|.**.INPU|
|00001a20| 54 3a 09 6c 69 73 74 48 | 6e 64 6c 09 54 68 65 20 |T:.listH|ndl.The |
|00001a30| 6c 69 73 74 20 74 6f 20 | 62 65 20 69 6e 73 65 72 |list to |be inser|
|00001a40| 74 65 64 20 69 6e 74 6f | 2e 0d 09 2a 2a 09 09 09 |ted into|...**...|
|00001a50| 64 61 74 61 09 09 50 6f | 69 6e 74 65 72 20 74 6f |data..Po|inter to|
|00001a60| 20 64 61 74 61 20 74 6f | 20 69 6e 73 65 72 74 2e | data to| insert.|
|00001a70| 0d 09 2a 2a 09 09 09 64 | 61 74 61 4c 65 6e 09 09 |..**...d|ataLen..|
|00001a80| 4c 65 6e 67 74 68 20 6f | 66 20 64 61 74 61 20 74 |Length o|f data t|
|00001a90| 6f 20 69 6e 73 65 72 74 | 2e 0d 09 2a 2a 09 09 09 |o insert|...**...|
|00001aa0| 72 6f 77 09 09 09 52 6f | 77 20 74 6f 20 69 6e 73 |row...Ro|w to ins|
|00001ab0| 65 72 74 20 69 6e 74 6f | 20 28 6f 72 20 2d 31 20 |ert into| (or -1 |
|00001ac0| 69 66 20 74 6f 20 62 65 | 20 64 65 74 65 72 6d 69 |if to be| determi|
|00001ad0| 6e 65 64 29 2e 0d 09 2a | 2a 09 09 09 63 6f 6c 09 |ned)...*|*...col.|
|00001ae0| 09 09 43 6f 6c 75 6d 6e | 20 74 6f 20 69 6e 73 65 |..Column| to inse|
|00001af0| 72 74 20 69 6e 74 6f 20 | 28 6f 72 20 2d 31 20 69 |rt into |(or -1 i|
|00001b00| 66 20 74 6f 20 62 65 20 | 64 65 74 65 72 6d 69 6e |f to be |determin|
|00001b10| 65 64 29 2e 0d 09 2a 2a | 09 52 45 53 55 4c 54 3a |ed)...**|.RESULT:|
|00001b20| 09 73 68 6f 72 74 09 09 | 54 68 65 20 70 6f 73 69 |.short..|The posi|
|00001b30| 74 69 6f 6e 20 61 74 20 | 77 68 69 63 68 20 74 68 |tion at |which th|
|00001b40| 65 20 64 61 74 61 20 77 | 61 73 20 69 6e 73 65 72 |e data w|as inser|
|00001b50| 74 65 64 2e 0d 09 2a 2a | 0d 09 2a 2a 09 49 6e 73 |ted...**|..**.Ins|
|00001b60| 65 72 74 20 61 20 63 65 | 6c 6c 20 61 6c 70 68 61 |ert a ce|ll alpha|
|00001b70| 62 65 74 69 63 61 6c 6c | 79 20 69 6e 74 6f 20 74 |beticall|y into t|
|00001b80| 68 65 20 6c 69 73 74 2e | 20 20 57 68 69 63 68 65 |he list.| Whiche|
|00001b90| 76 65 72 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |ver para|meter is|
|00001ba0| 20 70 61 73 73 65 64 20 | 69 6e 20 61 73 20 2d 31 | passed |in as -1|
|00001bb0| 2c 20 65 69 74 68 65 72 | 0d 09 2a 2a 09 72 6f 77 |, either|..**.row|
|00001bc0| 20 6f 72 20 63 6f 6c 75 | 6d 6e 2c 20 74 68 61 74 | or colu|mn, that|
|00001bd0| 20 69 73 20 74 68 65 20 | 64 69 6d 65 6e 73 69 6f | is the |dimensio|
|00001be0| 6e 20 74 68 61 74 20 69 | 73 20 64 65 74 65 72 6d |n that i|s determ|
|00001bf0| 69 6e 65 64 2e 20 20 54 | 68 65 20 6d 65 74 68 6f |ined. T|he metho|
|00001c00| 64 20 6f 66 20 68 61 6e | 64 6c 69 6e 67 20 68 65 |d of han|dling he|
|00001c10| 0d 09 2a 2a 09 63 6f 6d | 70 61 72 69 73 6f 6e 73 |..**.com|parisons|
|00001c20| 20 68 61 73 20 62 65 65 | 6e 20 63 68 61 6e 67 65 | has bee|n change|
|00001c30| 64 20 74 6f 20 61 6c 6c | 6f 77 20 63 75 73 74 6f |d to all|ow custo|
|00001c40| 6d 69 7a 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |mization| of the |
|00001c50| 6c 69 73 74 20 64 61 74 | 61 20 61 6e 64 20 73 65 |list dat|a and se|
|00001c60| 61 72 63 68 20 6d 65 74 | 68 6f 64 73 2e 0d 09 2a |arch met|hods...*|
|00001c70| 2a 09 42 65 66 6f 72 65 | 2c 20 69 74 20 77 61 73 |*.Before|, it was|
|00001c80| 20 61 73 73 75 6d 65 64 | 20 74 68 61 74 20 74 68 | assumed| that th|
|00001c90| 65 20 63 65 6c 6c 20 63 | 6f 6e 74 65 6e 74 20 77 |e cell c|ontent w|
|00001ca0| 61 73 20 74 65 78 74 2c | 20 61 6e 64 20 74 68 61 |as text,| and tha|
|00001cb0| 74 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 4c 44 |t the de|fault LD|
|00001cc0| 45 46 20 77 61 73 20 62 | 65 69 6e 67 0d 09 2a 2a |EF was b|eing..**|
|00001cd0| 09 75 73 65 64 2e 20 20 | 49 66 20 79 6f 75 20 77 |.used. |If you w|
|00001ce0| 72 69 74 65 20 61 20 63 | 75 73 74 6f 6d 20 4c 44 |rite a c|ustom LD|
|00001cf0| 45 46 20 74 68 61 74 20 | 75 73 65 73 20 61 20 64 |EF that |uses a d|
|00001d00| 69 66 66 65 72 65 6e 74 | 20 64 61 74 61 20 66 6f |ifferent| data fo|
|00001d10| 72 6d 61 74 2c 20 79 6f | 75 20 68 61 64 20 70 72 |rmat, yo|u had pr|
|00001d20| 6f 62 6c 65 6d 73 20 62 | 65 66 6f 72 65 2e 0d 09 |oblems b|efore...|
|00001d30| 2a 2a 09 4e 6f 77 2c 20 | 77 69 74 68 20 74 68 65 |**.Now, |with the|
|00001d40| 20 61 64 64 69 74 69 6f | 6e 20 6f 66 20 74 77 6f | additio|n of two|
|00001d50| 20 70 72 6f 63 65 64 75 | 72 65 20 70 6f 69 6e 74 | procedu|re point|
|00001d60| 65 72 73 2c 20 79 6f 75 | 20 63 61 6e 20 63 75 73 |ers, you| can cus|
|00001d70| 74 6f 6d 69 7a 65 20 74 | 68 65 20 64 61 74 61 20 |tomize t|he data |
|00001d80| 63 6f 6d 70 61 72 69 73 | 6f 6e 73 2e 0d 09 2a 2a |comparis|ons...**|
|00001d90| 09 54 68 65 20 74 77 6f | 20 6e 65 77 20 70 72 6f |.The two| new pro|
|00001da0| 63 73 20 61 72 65 3a 0d | 09 2a 2a 09 09 31 29 20 |cs are:.|.**..1) |
|00001db0| 67 65 74 43 6f 6d 70 61 | 72 65 44 61 74 61 0d 09 |getCompa|reData..|
|00001dc0| 2a 2a 09 09 32 29 20 64 | 6f 43 6f 6d 70 61 72 65 |**..2) d|oCompare|
|00001dd0| 44 61 74 61 0d 09 2a 2a | 09 54 68 65 20 66 69 72 |Data..**|.The fir|
|00001de0| 73 74 20 70 72 6f 63 2c | 20 67 65 74 43 6f 6d 70 |st proc,| getComp|
|00001df0| 61 72 65 44 61 74 61 2c | 20 69 66 20 6e 69 6c 2c |areData,| if nil,|
|00001e00| 20 73 69 6d 70 6c 79 20 | 67 65 74 73 20 74 68 65 | simply |gets the|
|00001e10| 20 64 61 74 61 20 6f 75 | 74 20 6f 66 20 74 68 65 | data ou|t of the|
|00001e20| 20 63 65 6c 6c 20 66 6f | 72 20 63 6f 6d 70 61 72 | cell fo|r compar|
|00001e30| 69 73 6f 6e 0d 09 2a 2a | 09 70 75 72 70 6f 73 65 |ison..**|.purpose|
|00001e40| 73 2e 20 20 49 66 20 69 | 74 20 69 73 20 6e 6f 74 |s. If i|t is not|
|00001e50| 20 6e 69 6c 2c 20 74 68 | 65 6e 20 74 68 65 20 70 | nil, th|en the p|
|00001e60| 72 6f 63 20 69 73 20 63 | 61 6c 6c 65 64 2c 20 61 |roc is c|alled, a|
|00001e70| 6e 64 20 74 68 65 20 70 | 72 6f 63 20 67 65 74 73 |nd the p|roc gets|
|00001e80| 20 74 68 65 20 64 61 74 | 61 20 6f 75 74 20 6f 66 | the dat|a out of|
|00001e90| 20 74 68 65 0d 09 2a 2a | 09 63 65 6c 6c 2e 20 20 | the..**|.cell. |
|00001ea0| 54 68 65 20 70 72 6f 63 | 20 63 61 6e 20 74 68 65 |The proc| can the|
|00001eb0| 6e 20 67 65 74 20 77 68 | 61 74 65 76 65 72 20 64 |n get wh|atever d|
|00001ec0| 61 74 61 20 69 74 20 6e | 65 65 64 73 20 74 6f 20 |ata it n|eeds to |
|00001ed0| 66 6f 72 20 74 68 65 20 | 70 75 72 70 6f 73 65 20 |for the |purpose |
|00001ee0| 6f 66 20 63 6f 6d 70 61 | 72 69 6e 67 20 74 6f 20 |of compa|ring to |
|00001ef0| 6f 74 68 65 72 0d 09 2a | 2a 09 63 65 6c 6c 73 20 |other..*|*.cells |
|00001f00| 61 6e 64 20 66 69 6e 64 | 69 6e 67 20 74 68 65 20 |and find|ing the |
|00001f10| 69 6e 73 65 72 74 20 6c | 6f 63 61 74 69 6f 6e 20 |insert l|ocation |
|00001f20| 69 6e 20 74 68 65 20 6c | 69 73 74 2e 20 20 54 68 |in the l|ist. Th|
|00001f30| 65 20 73 65 63 6f 6e 64 | 20 70 72 6f 63 2c 20 64 |e second| proc, d|
|00001f40| 6f 43 6f 6d 70 61 72 65 | 44 61 74 61 2c 20 69 66 |oCompare|Data, if|
|00001f50| 20 6e 69 6c 0d 09 2a 2a | 09 74 65 6c 6c 73 20 74 | nil..**|.tells t|
|00001f60| 68 65 20 4c 69 73 74 20 | 63 6f 6e 74 72 6f 6c 20 |he List |control |
|00001f70| 74 6f 20 63 61 6c 6c 20 | 49 55 4d 61 67 53 74 72 |to call |IUMagStr|
|00001f80| 69 6e 67 20 66 6f 72 20 | 74 68 65 20 70 75 72 70 |ing for |the purp|
|00001f90| 6f 73 65 20 6f 66 20 63 | 6f 6d 70 61 72 69 73 6f |ose of c|ompariso|
|00001fa0| 6e 2e 20 20 49 66 20 69 | 74 20 69 73 20 6e 6f 74 |n. If i|t is not|
|00001fb0| 20 6e 69 6c 2c 0d 09 2a | 2a 09 74 68 65 6e 20 74 | nil,..*|*.then t|
|00001fc0| 68 65 20 70 72 6f 63 20 | 69 73 20 63 61 6c 6c 65 |he proc |is calle|
|00001fd0| 64 20 69 6e 73 74 65 61 | 64 20 6f 66 20 49 55 4d |d instea|d of IUM|
|00001fe0| 61 67 53 74 72 69 6e 67 | 2c 20 61 6e 64 20 79 6f |agString|, and yo|
|00001ff0| 75 20 63 61 6e 20 64 6f | 20 77 68 61 74 65 76 65 |u can do| whateve|
|00002000| 72 20 6b 69 6e 64 20 6f | 66 20 63 6f 6d 70 61 72 |r kind o|f compar|
|00002010| 69 73 6f 6e 0d 09 2a 2a | 09 79 6f 75 20 77 69 73 |ison..**|.you wis|
|00002020| 68 2e 20 20 59 6f 75 72 | 20 70 72 6f 63 20 69 73 |h. Your| proc is|
|00002030| 20 61 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 20 66 | a repla|cement f|
|00002040| 6f 72 20 49 55 4d 61 67 | 53 74 72 69 6e 67 2c 20 |or IUMag|String, |
|00002050| 73 6f 20 69 74 20 73 68 | 6f 75 6c 64 20 62 65 20 |so it sh|ould be |
|00002060| 6f 66 20 74 68 61 74 20 | 66 6f 72 6d 2c 20 65 78 |of that |form, ex|
|00002070| 63 65 70 74 0d 09 2a 2a | 09 74 68 61 74 20 74 68 |cept..**|.that th|
|00002080| 65 20 70 72 6f 74 6f 74 | 79 70 65 20 69 73 20 61 |e protot|ype is a|
|00002090| 20 43 20 70 72 6f 74 6f | 74 79 70 65 2c 20 69 6e | C proto|type, in|
|000020a0| 73 74 65 61 64 20 6f 66 | 20 74 79 70 65 20 70 61 |stead of| type pa|
|000020b0| 73 63 61 6c 2e 0d 09 2a | 2a 0d 09 2a 2a 09 54 68 |scal...*|*..**.Th|
|000020c0| 65 20 70 72 6f 74 6f 74 | 79 70 65 73 20 61 72 65 |e protot|ypes are|
|000020d0| 3a 0d 09 2a 2a 0d 09 2a | 2a 09 74 79 70 65 64 65 |:..**..*|*.typede|
|000020e0| 66 20 76 6f 69 64 20 20 | 28 2a 43 4c 47 65 74 43 |f void |(*CLGetC|
|000020f0| 6f 6d 70 61 72 65 44 61 | 74 61 50 72 6f 63 50 74 |ompareDa|taProcPt|
|00002100| 72 29 28 76 6f 69 64 20 | 2a 73 72 63 2c 20 73 68 |r)(void |*src, sh|
|00002110| 6f 72 74 20 73 72 63 6c | 65 6e 2c 20 76 6f 69 64 |ort srcl|en, void|
|00002120| 20 2a 64 73 74 2c 20 73 | 68 6f 72 74 20 2a 64 73 | *dst, s|hort *ds|
|00002130| 74 6c 65 6e 29 3b 0d 09 | 2a 2a 09 74 79 70 65 64 |tlen);..|**.typed|
|00002140| 65 66 20 73 68 6f 72 74 | 20 28 2a 43 4c 44 6f 43 |ef short| (*CLDoC|
|00002150| 6f 6d 70 61 72 65 44 61 | 74 61 50 72 6f 63 50 74 |ompareDa|taProcPt|
|00002160| 72 29 28 76 6f 69 64 20 | 2a 70 74 72 61 2c 20 76 |r)(void |*ptra, v|
|00002170| 6f 69 64 20 2a 70 74 72 | 62 2c 20 73 68 6f 72 74 |oid *ptr|b, short|
|00002180| 20 6c 65 6e 61 2c 20 73 | 68 6f 72 74 20 6c 65 6e | lena, s|hort len|
|00002190| 62 29 3b 0d 09 2a 2a 0d | 09 2a 2a 09 54 68 65 20 |b);..**.|.**.The |
|000021a0| 47 65 74 43 6f 6d 70 61 | 72 65 44 61 74 61 20 70 |GetCompa|reData p|
|000021b0| 72 6f 63 20 69 73 20 70 | 61 73 73 65 64 20 69 6e |roc is p|assed in|
|000021c0| 20 61 20 72 65 66 65 72 | 65 6e 63 65 20 74 6f 20 | a refer|ence to |
|000021d0| 74 68 65 20 64 61 74 61 | 2c 20 61 6e 64 20 61 20 |the data|, and a |
|000021e0| 6c 65 6e 67 74 68 2e 20 | 20 49 74 73 20 6a 6f 62 |length. | Its job|
|000021f0| 20 69 73 20 74 6f 0d 09 | 2a 2a 09 74 68 65 6e 20 | is to..|**.then |
|00002200| 72 65 74 75 72 6e 20 74 | 68 65 20 64 61 74 61 20 |return t|he data |
|00002210| 61 6e 64 20 64 61 74 61 | 20 6c 65 6e 67 74 68 20 |and data| length |
|00002220| 6f 66 20 77 68 61 74 20 | 74 68 65 20 63 6f 6d 70 |of what |the comp|
|00002230| 61 72 65 20 64 61 74 61 | 20 73 68 6f 75 6c 64 20 |are data| should |
|00002240| 6c 6f 6f 6b 20 6c 69 6b | 65 2e 0d 09 2a 2a 0d 09 |look lik|e...**..|
|00002250| 2a 2a 09 54 68 65 20 44 | 6f 43 6f 6d 70 61 72 65 |**.The D|oCompare|
|00002260| 44 61 74 61 20 70 72 6f | 63 20 69 73 20 6a 75 73 |Data pro|c is jus|
|00002270| 74 20 61 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |t a repl|acement |
|00002280| 66 6f 72 20 49 55 4d 61 | 67 53 74 72 69 6e 67 2e |for IUMa|gString.|
|00002290| 20 20 50 61 72 61 6d 65 | 74 65 72 73 20 61 72 65 | Parame|ters are|
|000022a0| 20 61 73 20 65 78 70 65 | 63 74 65 64 2e 0d 09 2a | as expe|cted...*|
|000022b0| 2a 09 54 6f 20 73 65 74 | 20 74 68 65 20 70 72 6f |*.To set| the pro|
|000022c0| 63 73 2c 20 79 6f 75 20 | 66 69 72 73 74 20 6e 65 |cs, you |first ne|
|000022d0| 65 64 20 74 6f 20 68 61 | 76 65 20 61 20 4c 69 73 |ed to ha|ve a Lis|
|000022e0| 74 20 63 6f 6e 74 72 6f | 6c 2e 20 20 54 68 65 20 |t contro|l. The |
|000022f0| 62 65 6c 6f 77 20 65 78 | 61 6d 70 6c 65 20 61 73 |below ex|ample as|
|00002300| 73 75 6d 65 73 20 74 68 | 61 74 0d 09 2a 2a 09 74 |sumes th|at..**.t|
|00002310| 68 65 20 77 69 6e 64 6f | 77 20 68 61 73 20 61 20 |he windo|w has a |
|00002320| 73 69 6e 67 6c 65 20 4c | 69 73 74 20 63 6f 6e 74 |single L|ist cont|
|00002330| 72 6f 6c 2e 0d 09 2a 2a | 0d 09 2a 2a 0d 09 2a 2a |rol...**|..**..**|
|00002340| 09 73 74 61 74 69 63 20 | 73 68 6f 72 74 09 4d 79 |.static |short.My|
|00002350| 44 6f 43 6f 6d 70 61 72 | 65 44 61 74 61 28 76 6f |DoCompar|eData(vo|
|00002360| 69 64 20 2a 70 74 72 61 | 2c 20 76 6f 69 64 20 2a |id *ptra|, void *|
|00002370| 70 74 72 62 2c 20 73 68 | 6f 72 74 20 6c 65 6e 61 |ptrb, sh|ort lena|
|00002380| 2c 20 73 68 6f 72 74 20 | 6c 65 6e 62 29 3b 0d 09 |, short |lenb);..|
|00002390| 2a 2a 09 73 74 61 74 69 | 63 20 76 6f 69 64 09 09 |**.stati|c void..|
|000023a0| 4d 79 47 65 74 43 6f 6d | 70 61 72 65 44 61 74 61 |MyGetCom|pareData|
|000023b0| 28 76 6f 69 64 20 2a 73 | 72 63 2c 20 73 68 6f 72 |(void *s|rc, shor|
|000023c0| 74 20 73 72 63 6c 65 6e | 2c 20 76 6f 69 64 20 2a |t srclen|, void *|
|000023d0| 64 73 74 2c 20 73 68 6f | 72 74 20 2a 64 73 74 6c |dst, sho|rt *dstl|
|000023e0| 65 6e 29 3b 0d 09 2a 2a | 09 73 74 61 74 69 63 20 |en);..**|.static |
|000023f0| 42 6f 6f 6c 65 61 6e 09 | 4d 79 4b 65 79 46 69 6c |Boolean.|MyKeyFil|
|00002400| 74 65 72 28 4c 69 73 74 | 48 61 6e 64 6c 65 20 6c |ter(List|Handle l|
|00002410| 69 73 74 2c 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |ist, Eve|ntRecord|
|00002420| 20 2a 65 76 65 6e 74 29 | 3b 0d 09 2a 2a 0d 09 2a | *event)|;..**..*|
|00002430| 2a 09 09 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |*..Contr|olHandle|
|00002440| 09 63 74 6c 3b 0d 09 2a | 2a 09 09 4c 69 73 74 48 |.ctl;..*|*..ListH|
|00002450| 61 6e 64 6c 65 09 09 6c | 69 73 74 3b 0d 09 2a 2a |andle..l|ist;..**|
|00002460| 09 09 43 4c 44 61 74 61 | 48 6e 64 6c 09 09 6c 69 |..CLData|Hndl..li|
|00002470| 73 74 44 61 74 61 3b 0d | 09 2a 2a 0d 09 2a 2a 09 |stData;.|.**..**.|
|00002480| 09 63 74 6c 20 3d 20 43 | 4c 4e 65 78 74 28 77 69 |.ctl = C|LNext(wi|
|00002490| 6e 64 6f 77 2c 20 26 6c | 69 73 74 2c 20 6e 69 6c |ndow, &l|ist, nil|
|000024a0| 2c 20 31 2c 20 66 61 6c | 73 65 29 3b 0d 09 2a 2a |, 1, fal|se);..**|
|000024b0| 09 09 6c 69 73 74 44 61 | 74 61 20 3d 20 28 43 4c |..listDa|ta = (CL|
|000024c0| 44 61 74 61 48 6e 64 6c | 29 28 2a 63 74 6c 29 2d |DataHndl|)(*ctl)-|
|000024d0| 3e 63 6f 6e 74 72 6c 44 | 61 74 61 3b 0d 09 2a 2a |>contrlD|ata;..**|
|000024e0| 09 09 28 2a 6c 69 73 74 | 44 61 74 61 29 2d 3e 67 |..(*list|Data)->g|
|000024f0| 65 74 43 6f 6d 70 61 72 | 65 44 61 74 61 20 3d 20 |etCompar|eData = |
|00002500| 4d 79 47 65 74 43 6f 6d | 70 61 72 65 44 61 74 61 |MyGetCom|pareData|
|00002510| 3b 0d 09 2a 2a 09 09 28 | 2a 6c 69 73 74 44 61 74 |;..**..(|*listDat|
|00002520| 61 29 2d 3e 64 6f 43 6f | 6d 70 61 72 65 44 61 74 |a)->doCo|mpareDat|
|00002530| 61 20 20 3d 20 4d 79 44 | 6f 43 6f 6d 70 61 72 65 |a = MyD|oCompare|
|00002540| 44 61 74 61 3b 0d 09 2a | 2a 09 09 28 2a 6c 69 73 |Data;..*|*..(*lis|
|00002550| 74 44 61 74 61 29 2d 3e | 6b 65 79 46 69 6c 74 65 |tData)->|keyFilte|
|00002560| 72 20 20 20 20 20 20 3d | 20 4d 79 4b 65 79 46 69 |r =| MyKeyFi|
|00002570| 6c 74 65 72 3b 0d 09 2a | 2a 0d 09 2a 2a 09 09 09 |lter;..*|*..**...|
|00002580| 54 68 65 20 61 62 6f 76 | 65 20 63 6f 64 65 20 66 |The abov|e code f|
|00002590| 69 72 73 74 20 67 65 74 | 73 20 74 68 65 20 66 69 |irst get|s the fi|
|000025a0| 72 73 74 20 28 6f 6e 6c | 79 29 20 4c 69 73 74 20 |rst (onl|y) List |
|000025b0| 63 6f 6e 74 72 6f 6c 20 | 69 6e 20 77 69 6e 64 6f |control |in windo|
|000025c0| 77 2e 20 20 49 74 20 74 | 68 65 6e 20 67 65 74 73 |w. It t|hen gets|
|000025d0| 0d 09 2a 2a 09 09 09 74 | 68 65 20 6c 69 73 74 44 |..**...t|he listD|
|000025e0| 61 74 61 20 72 65 63 6f | 72 64 20 73 6f 20 74 68 |ata reco|rd so th|
|000025f0| 61 74 20 69 74 20 63 61 | 6e 20 73 74 6f 72 65 20 |at it ca|n store |
|00002600| 74 68 65 20 63 6f 6d 70 | 61 72 65 20 70 72 6f 63 |the comp|are proc|
|00002610| 73 20 69 6e 74 6f 20 74 | 68 65 20 6c 69 73 74 2e |s into t|he list.|
|00002620| 20 20 54 68 65 0d 09 2a | 2a 09 09 09 70 72 6f 63 | The..*|*...proc|
|00002630| 73 20 61 72 65 20 74 68 | 65 6e 20 73 74 6f 72 65 |s are th|en store|
|00002640| 64 20 69 6e 74 6f 20 74 | 68 65 20 72 65 63 6f 72 |d into t|he recor|
|00002650| 64 2e 0d 09 2a 2f 0d 0d | 42 6f 6f 6c 65 61 6e 09 |d...*/..|Boolean.|
|00002660| 09 09 43 4c 4b 65 79 28 | 57 69 6e 64 6f 77 50 74 |..CLKey(|WindowPt|
|00002670| 72 20 77 69 6e 64 6f 77 | 2c 20 45 76 65 6e 74 52 |r window|, EventR|
|00002680| 65 63 6f 72 64 20 2a 65 | 76 65 6e 74 29 3b 0d 09 |ecord *e|vent);..|
|00002690| 2f 2a 0d 09 2a 2a 09 a6 | 20 48 61 6e 64 6c 65 20 |/*..**..| Handle |
|000026a0| 61 20 6b 65 79 70 72 65 | 73 73 20 66 6f 72 20 61 |a keypre|ss for a|
|000026b0| 20 6c 69 73 74 20 63 6f | 6e 74 72 6f 6c 2e 0d 09 | list co|ntrol...|
|000026c0| 2a 2a 0d 09 2a 2a 09 49 | 4e 50 55 54 3a 09 77 69 |**..**.I|NPUT:.wi|
|000026d0| 6e 64 6f 77 09 09 54 68 | 65 20 77 69 6e 64 6f 77 |ndow..Th|e window|
|000026e0| 20 74 6f 20 63 68 65 63 | 6b 20 66 6f 72 20 61 20 | to chec|k for a |
|000026f0| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 20 6b 65 79 |List con|trol key|
|00002700| 70 72 65 73 73 20 69 6e | 2e 0d 09 2a 2a 09 09 09 |press in|...**...|
|00002710| 65 76 65 6e 74 09 09 54 | 68 65 20 6b 65 79 70 72 |event..T|he keypr|
|00002720| 65 73 73 20 65 76 65 6e | 74 2e 0d 09 2a 2a 09 52 |ess even|t...**.R|
|00002730| 45 53 55 4c 54 3a 09 42 | 6f 6f 6c 65 61 6e 09 09 |ESULT:.B|oolean..|
|00002740| 54 72 75 65 20 69 66 20 | 61 20 4c 69 73 74 20 63 |True if |a List c|
|00002750| 6f 6e 74 72 6f 6c 20 75 | 73 65 64 20 74 68 65 20 |ontrol u|sed the |
|00002760| 65 76 65 6e 74 2e 0d 09 | 2a 2a 0d 09 2a 2a 09 53 |event...|**..**.S|
|00002770| 65 65 20 69 66 20 74 68 | 65 20 6b 65 79 70 72 65 |ee if th|e keypre|
|00002780| 73 73 20 65 76 65 6e 74 | 20 61 70 70 6c 69 65 73 |ss event| applies|
|00002790| 20 74 6f 20 74 68 65 20 | 4c 69 73 74 20 63 6f 6e | to the |List con|
|000027a0| 74 72 6f 6c 2c 20 61 6e | 64 20 69 66 20 69 74 20 |trol, an|d if it |
|000027b0| 64 6f 65 73 2c 20 68 61 | 6e 64 6c 65 20 69 74 20 |does, ha|ndle it |
|000027c0| 61 6e 64 0d 09 2a 2a 09 | 72 65 74 75 72 6e 20 74 |and..**.|return t|
|000027d0| 72 75 65 2e 20 20 54 68 | 65 20 6b 65 79 70 72 65 |rue. Th|e keypre|
|000027e0| 73 73 20 63 61 6e 20 6f | 6e 6c 79 20 62 65 20 75 |ss can o|nly be u|
|000027f0| 73 65 64 20 62 79 20 74 | 68 65 20 4c 69 73 74 20 |sed by t|he List |
|00002800| 63 6f 6e 74 72 6f 6c 20 | 69 66 20 74 68 65 20 4c |control |if the L|
|00002810| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 0d 09 2a 2a 09 |ist cont|rol..**.|
|00002820| 68 61 73 20 6b 65 79 2d | 70 6f 73 69 74 69 6f 6e |has key-|position|
|00002830| 69 6e 67 20 73 65 74 2e | 20 2a 2f 0d 0d 4c 69 73 |ing set.| */..Lis|
|00002840| 74 48 61 6e 64 6c 65 09 | 09 43 4c 4e 65 77 28 73 |tHandle.|.CLNew(s|
|00002850| 68 6f 72 74 20 76 69 65 | 77 49 44 2c 20 42 6f 6f |hort vie|wID, Boo|
|00002860| 6c 65 61 6e 20 76 69 73 | 2c 20 52 65 63 74 20 2a |lean vis|, Rect *|
|00002870| 76 52 65 63 74 2c 20 73 | 68 6f 72 74 20 6e 75 6d |vRect, s|hort num|
|00002880| 52 6f 77 73 2c 20 73 68 | 6f 72 74 20 6e 75 6d 43 |Rows, sh|ort numC|
|00002890| 6f 6c 73 2c 0d 09 09 09 | 09 09 20 20 73 68 6f 72 |ols,....|.. shor|
|000028a0| 74 20 63 65 6c 6c 48 65 | 69 67 68 74 2c 20 73 68 |t cellHe|ight, sh|
|000028b0| 6f 72 74 20 63 65 6c 6c | 57 69 64 74 68 2c 20 73 |ort cell|Width, s|
|000028c0| 68 6f 72 74 20 74 68 65 | 4c 50 72 6f 63 2c 0d 09 |hort the|LProc,..|
|000028d0| 09 09 09 09 20 20 57 69 | 6e 64 6f 77 50 74 72 20 |.... Wi|ndowPtr |
|000028e0| 77 69 6e 64 6f 77 2c 20 | 73 68 6f 72 74 20 6d 6f |window, |short mo|
|000028f0| 64 65 29 3b 0d 09 2f 2a | 0d 09 2a 2a 09 a6 20 43 |de);../*|..**.. C|
|00002900| 72 65 61 74 65 20 61 20 | 4c 69 73 74 20 63 6f 6e |reate a |List con|
|00002910| 74 72 6f 6c 20 66 6f 72 | 20 74 68 65 20 77 69 6e |trol for| the win|
|00002920| 64 6f 77 2e 0d 09 2a 2a | 0d 09 2a 2a 09 54 68 69 |dow...**|..**.Thi|
|00002930| 73 20 4c 69 73 74 20 63 | 6f 6e 74 72 6f 6c 20 69 |s List c|ontrol i|
|00002940| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 64 6f |mplement|ation do|
|00002950| 65 73 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |es the f|ollowing|
|00002960| 3a 0d 09 2a 2a 0d 09 2a | 2a 09 31 29 09 4d 61 6b |:..**..*|*.1).Mak|
|00002970| 65 73 20 75 73 69 6e 67 | 20 6c 69 73 74 73 20 69 |es using| lists i|
|00002980| 6e 20 61 20 6e 6f 6e 2d | 64 69 61 6c 6f 67 20 77 |n a non-|dialog w|
|00002990| 69 6e 64 6f 77 20 65 61 | 73 69 65 72 2e 0d 09 2a |indow ea|sier...*|
|000029a0| 2a 09 32 29 09 54 68 65 | 20 4c 69 73 74 20 69 73 |*.2).The| List is|
|000029b0| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 61 | automat|ically a|
|000029c0| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|000029d0| 68 65 20 77 69 6e 64 6f | 77 2c 20 73 69 6e 63 65 |he windo|w, since|
|000029e0| 0d 09 2a 2a 09 09 69 74 | 20 69 73 20 69 6e 20 74 |..**..it| is in t|
|000029f0| 68 65 20 77 69 6e 64 6f | 77 27 73 20 63 6f 6e 74 |he windo|w's cont|
|00002a00| 72 6f 6c 20 6c 69 73 74 | 2e 0d 09 2a 2a 09 34 29 |rol list|...**.4)|
|00002a10| 09 55 70 64 61 74 69 6e | 67 20 6f 66 20 74 68 65 |.Updatin|g of the|
|00002a20| 20 4c 69 73 74 20 69 73 | 20 6d 75 63 68 20 73 69 | List is| much si|
|00002a30| 6d 70 6c 65 72 2c 20 73 | 69 6e 63 65 20 61 6c 6c |mpler, s|ince all|
|00002a40| 20 74 68 61 74 20 69 73 | 0d 09 2a 2a 09 09 6e 65 | that is|..**..ne|
|00002a50| 63 65 73 73 61 72 79 20 | 69 73 20 74 6f 20 64 72 |cessary |is to dr|
|00002a60| 61 77 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 28 |aw the c|ontrol (|
|00002a70| 6f 72 20 61 6c 6c 20 74 | 68 65 20 77 69 6e 64 6f |or all t|he windo|
|00002a80| 77 27 73 20 63 6f 6e 74 | 72 6f 6c 73 20 77 69 74 |w's cont|rols wit|
|00002a90| 68 0d 09 2a 2a 09 09 61 | 20 44 72 61 77 43 6f 6e |h..**..a| DrawCon|
|00002aa0| 74 72 6f 6c 73 20 63 61 | 6c 6c 29 2e 0d 09 2a 2a |trols ca|ll)...**|
|00002ab0| 09 35 29 09 57 68 61 74 | 20 69 73 6e 27 74 20 68 |.5).What| isn't h|
|00002ac0| 61 6e 64 6c 65 64 20 61 | 75 74 6f 6d 61 74 69 63 |andled a|utomatic|
|00002ad0| 61 6c 6c 79 20 62 79 20 | 74 72 61 63 6b 69 6e 67 |ally by |tracking|
|00002ae0| 20 74 68 65 20 63 6f 6e | 74 72 6f 6c 20 63 61 6e | the con|trol can|
|00002af0| 20 62 65 20 68 61 6e 64 | 6c 65 64 0d 09 2a 2a 09 | be hand|led..**.|
|00002b00| 09 77 69 74 68 20 61 20 | 64 69 72 65 63 74 20 63 |.with a |direct c|
|00002b10| 61 6c 6c 2e 20 20 54 68 | 65 72 65 20 61 72 65 20 |all. Th|ere are |
|00002b20| 73 69 6d 70 6c 65 20 63 | 61 6c 6c 73 20 74 6f 20 |simple c|alls to |
|00002b30| 68 61 6e 64 6c 65 20 4c | 69 73 74 20 65 76 65 6e |handle L|ist even|
|00002b40| 74 73 2e 0d 09 2a 2a 09 | 36 29 09 57 68 65 6e 20 |ts...**.|6).When |
|00002b50| 79 6f 75 20 63 6c 6f 73 | 65 20 74 68 65 20 77 69 |you clos|e the wi|
|00002b60| 6e 64 6f 77 2c 20 74 68 | 65 20 4c 69 73 74 52 65 |ndow, th|e ListRe|
|00002b70| 63 6f 72 64 20 69 73 20 | 64 69 73 70 6f 73 65 64 |cord is |disposed|
|00002b80| 20 6f 66 2e 0d 09 2a 2a | 09 09 28 54 68 69 73 20 | of...**|..(This |
|00002b90| 61 75 74 6f 6d 61 74 69 | 63 20 64 69 73 70 6f 73 |automati|c dispos|
|00002ba0| 61 6c 20 63 61 6e 20 65 | 61 73 69 6c 79 20 62 65 |al can e|asily be|
|00002bb0| 20 64 65 66 65 61 74 65 | 64 2e 29 0d 09 2a 2a 0d | defeate|d.)..**.|
|00002bc0| 09 2a 2a 09 54 6f 20 63 | 72 65 61 74 65 20 61 20 |.**.To c|reate a |
|00002bd0| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 2c 20 79 6f |List con|trol, yo|
|00002be0| 75 20 6f 6e 6c 79 20 6e | 65 65 64 20 61 20 73 69 |u only n|eed a si|
|00002bf0| 6e 67 6c 65 20 63 61 6c | 6c 2e 20 20 46 6f 72 20 |ngle cal|l. For |
|00002c00| 65 78 61 6d 70 6c 65 3a | 0d 09 2a 2a 0d 09 2a 2a |example:|..**..**|
|00002c10| 09 09 6c 69 73 74 20 3d | 20 43 4c 4e 65 77 28 72 |..list =| CLNew(r|
|00002c20| 56 69 65 77 43 74 6c 2c | 09 09 09 52 65 73 6f 75 |ViewCtl,|...Resou|
|00002c30| 72 63 65 20 49 44 20 6f | 66 20 76 69 65 77 20 63 |rce ID o|f view c|
|00002c40| 6f 6e 74 72 6f 6c 20 66 | 6f 72 20 4c 69 73 74 20 |ontrol f|or List |
|00002c50| 63 6f 6e 74 72 6f 6c 2e | 0d 09 2a 2a 09 09 09 09 |control.|..**....|
|00002c60| 09 20 74 72 75 65 2c 09 | 09 09 09 49 6e 69 74 69 |. true,.|...Initi|
|00002c70| 61 6c 6c 79 20 76 69 73 | 69 62 6c 65 2e 0d 09 2a |ally vis|ible...*|
|00002c80| 2a 09 09 09 09 09 20 26 | 76 69 65 77 52 65 63 74 |*..... &|viewRect|
|00002c90| 2c 09 09 09 56 69 65 77 | 20 72 65 63 74 20 6f 66 |,...View| rect of|
|00002ca0| 20 6c 69 73 74 2e 0d 09 | 2a 2a 09 09 09 09 09 20 | list...|**..... |
|00002cb0| 6e 75 6d 52 6f 77 73 2c | 09 09 09 4e 75 6d 62 65 |numRows,|...Numbe|
|00002cc0| 72 20 6f 66 20 72 6f 77 | 73 20 74 6f 20 63 72 65 |r of row|s to cre|
|00002cd0| 61 74 65 20 4c 69 73 74 | 20 77 69 74 68 2e 0d 09 |ate List| with...|
|00002ce0| 2a 2a 09 09 09 09 09 20 | 6e 75 6d 43 6f 6c 73 2c |**..... |numCols,|
|00002cf0| 09 09 09 4e 75 6d 62 65 | 72 20 6f 66 20 63 6f 6c |...Numbe|r of col|
|00002d00| 75 6d 6e 73 20 74 6f 20 | 63 72 65 61 74 65 20 4c |umns to |create L|
|00002d10| 69 73 74 20 77 69 74 68 | 2e 0d 09 2a 2a 09 09 09 |ist with|...**...|
|00002d20| 09 09 20 63 65 6c 6c 48 | 65 69 67 68 74 2c 0d 09 |.. cellH|eight,..|
|00002d30| 2a 2a 09 09 09 09 09 20 | 63 65 6c 6c 57 69 64 74 |**..... |cellWidt|
|00002d40| 68 2c 0d 09 2a 2a 09 09 | 09 09 09 20 74 68 65 4c |h,..**..|... theL|
|00002d50| 50 72 6f 63 2c 09 09 09 | 43 75 73 74 6f 6d 20 4c |Proc,...|Custom L|
|00002d60| 69 73 74 20 70 72 6f 63 | 65 64 75 72 65 20 72 65 |ist proc|edure re|
|00002d70| 73 6f 75 72 63 65 20 49 | 44 2e 0d 09 2a 2a 09 09 |source I|D...**..|
|00002d80| 09 09 09 20 77 69 6e 64 | 6f 77 2c 09 09 09 57 69 |... wind|ow,...Wi|
|00002d90| 6e 64 6f 77 20 74 6f 20 | 68 6f 6c 64 20 4c 69 73 |ndow to |hold Lis|
|00002da0| 74 20 63 6f 6e 74 72 6f | 6c 2e 0d 09 2a 2a 09 09 |t contro|l...**..|
|00002db0| 09 09 09 20 63 6c 48 53 | 63 72 6f 6c 6c 20 7c 20 |... clHS|croll | |
|00002dc0| 62 6c 42 72 64 72 20 7c | 20 63 6c 41 63 74 69 76 |blBrdr || clActiv|
|00002dd0| 65 29 3b 09 48 6f 72 69 | 7a 6f 6e 74 61 6c 20 73 |e);.Hori|zontal s|
|00002de0| 63 72 6f 6c 6c 62 61 72 | 2c 20 61 63 74 69 76 65 |crollbar|, active|
|00002df0| 20 4c 69 73 74 2e 0d 09 | 2a 2a 0d 09 2a 2a 09 54 | List...|**..**.T|
|00002e00| 68 65 20 76 61 72 69 6f | 75 73 20 63 68 6f 69 63 |he vario|us choic|
|00002e10| 65 73 20 66 6f 72 20 74 | 68 65 20 4c 69 73 74 20 |es for t|he List |
|00002e20| 63 6f 6e 74 72 6f 6c 20 | 61 72 65 20 64 65 66 69 |control |are defi|
|00002e30| 6e 65 64 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0d |ned as f|ollows:.|
|00002e40| 09 2a 2a 0d 09 2a 2a 09 | 23 64 65 66 69 6e 65 20 |.**..**.|#define |
|00002e50| 63 6c 48 53 63 72 6f 6c | 6c 09 09 30 78 30 30 30 |clHScrol|l..0x000|
|00002e60| 32 0d 09 2a 2a 09 23 64 | 65 66 69 6e 65 20 63 6c |2..**.#d|efine cl|
|00002e70| 56 53 63 72 6f 6c 6c 09 | 09 30 78 30 30 30 38 0d |VScroll.|.0x0008.|
|00002e80| 09 2a 2a 09 23 64 65 66 | 69 6e 65 20 63 6c 41 63 |.**.#def|ine clAc|
|00002e90| 74 69 76 65 09 09 30 78 | 30 30 32 30 0d 09 2a 2a |tive..0x|0020..**|
|00002ea0| 09 23 64 65 66 69 6e 65 | 20 63 6c 53 68 6f 77 41 |.#define| clShowA|
|00002eb0| 63 74 69 76 65 09 30 78 | 30 30 34 30 0d 09 2a 2a |ctive.0x|0040..**|
|00002ec0| 09 23 64 65 66 69 6e 65 | 20 63 6c 4b 65 79 50 6f |.#define| clKeyPo|
|00002ed0| 73 09 09 30 78 30 30 38 | 30 0d 09 2a 2a 09 23 64 |s..0x008|0..**.#d|
|00002ee0| 65 66 69 6e 65 20 63 6c | 54 77 6f 53 74 65 70 09 |efine cl|TwoStep.|
|00002ef0| 09 30 78 30 31 30 30 0d | 09 2a 2a 09 23 64 65 66 |.0x0100.|.**.#def|
|00002f00| 69 6e 65 20 63 6c 48 61 | 73 47 72 6f 77 09 09 30 |ine clHa|sGrow..0|
|00002f10| 78 30 32 30 30 0d 09 2a | 2a 09 23 64 65 66 69 6e |x0200..*|*.#defin|
|00002f20| 65 20 63 6c 44 72 61 77 | 49 74 09 09 30 78 38 30 |e clDraw|It..0x80|
|00002f30| 30 30 0d 09 2a 2a 0d 09 | 2a 2a 09 63 6c 48 53 63 |00..**..|**.clHSc|
|00002f40| 72 6f 6c 6c 3a 09 09 43 | 72 65 61 74 65 20 61 20 |roll:..C|reate a |
|00002f50| 6c 69 73 74 20 74 68 61 | 74 20 69 6e 63 6c 75 64 |list tha|t includ|
|00002f60| 65 73 20 61 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 |es a hor|izontal |
|00002f70| 73 63 72 6f 6c 6c 62 61 | 72 2e 0d 09 2a 2a 09 63 |scrollba|r...**.c|
|00002f80| 6c 56 53 63 72 6f 6c 6c | 3a 09 09 43 72 65 61 74 |lVScroll|:..Creat|
|00002f90| 65 20 61 20 6c 69 73 74 | 20 74 68 61 74 20 69 6e |e a list| that in|
|00002fa0| 63 6c 75 64 65 73 20 61 | 20 76 65 72 74 69 63 61 |cludes a| vertica|
|00002fb0| 6c 20 73 63 72 6f 6c 6c | 62 61 72 2e 0d 09 2a 2a |l scroll|bar...**|
|00002fc0| 09 63 6c 41 63 74 69 76 | 65 3a 09 09 4d 61 6b 65 |.clActiv|e:..Make|
|00002fd0| 20 74 68 69 73 20 74 68 | 65 20 69 6e 69 74 69 61 | this th|e initia|
|00002fe0| 6c 6c 79 20 61 63 74 69 | 76 65 20 63 6f 6e 74 72 |lly acti|ve contr|
|00002ff0| 6f 6c 20 66 6f 72 20 74 | 68 65 20 77 69 6e 64 6f |ol for t|he windo|
|00003000| 77 2e 0d 09 2a 2a 09 63 | 6c 53 68 6f 77 41 63 74 |w...**.c|lShowAct|
|00003010| 69 76 65 3a 09 57 68 65 | 6e 20 74 68 65 20 63 6f |ive:.Whe|n the co|
|00003020| 6e 74 72 6f 6c 20 69 73 | 20 61 63 74 69 76 65 2c |ntrol is| active,|
|00003030| 20 73 68 6f 77 20 74 68 | 61 74 20 69 74 20 69 73 | show th|at it is|
|00003040| 20 62 79 20 64 72 61 77 | 69 6e 67 20 61 20 73 65 | by draw|ing a se|
|00003050| 6c 65 63 74 69 6f 6e 0d | 09 2a 2a 09 09 09 09 09 |lection.|.**.....|
|00003060| 62 6f 72 64 65 72 20 61 | 72 6f 75 6e 64 20 74 68 |border a|round th|
|00003070| 65 20 63 6f 6e 74 72 6f | 6c 2e 20 20 54 68 69 73 |e contro|l. This|
|00003080| 20 69 73 20 74 68 65 20 | 6e 65 77 20 37 2e 30 20 | is the |new 7.0 |
|00003090| 68 75 6d 61 6e 2d 69 6e | 74 65 72 66 61 63 65 0d |human-in|terface.|
|000030a0| 09 2a 2a 09 09 09 09 09 | 6d 65 74 68 6f 64 20 6f |.**.....|method o|
|000030b0| 66 20 73 68 6f 77 69 6e | 67 20 77 68 69 63 68 20 |f showin|g which |
|000030c0| 63 6f 6e 74 72 6f 6c 20 | 69 73 20 61 63 74 69 76 |control |is activ|
|000030d0| 65 2e 20 20 28 49 74 20 | 61 6c 73 6f 20 77 6f 72 |e. (It |also wor|
|000030e0| 6b 73 20 69 6e 20 73 79 | 73 74 65 6d 20 36 2e 29 |ks in sy|stem 6.)|
|000030f0| 0d 09 2a 2a 09 63 6c 4b | 65 79 50 6f 73 3a 09 09 |..**.clK|eyPos:..|
|00003100| 41 6c 6c 6f 77 20 6c 69 | 73 74 20 70 6f 73 69 74 |Allow li|st posit|
|00003110| 69 6f 6e 69 6e 67 2c 20 | 62 61 73 65 64 20 6f 6e |ioning, |based on|
|00003120| 20 75 73 65 72 20 6b 65 | 79 70 72 65 73 73 65 73 | user ke|ypresses|
|00003130| 2e 20 20 54 68 69 73 20 | 61 73 73 75 6d 65 73 20 |. This |assumes |
|00003140| 74 68 61 74 0d 09 2a 2a | 09 09 09 09 09 74 68 65 |that..**|.....the|
|00003150| 20 6c 69 73 74 20 69 73 | 20 61 6c 70 68 61 62 65 | list is| alphabe|
|00003160| 74 69 7a 65 64 20 73 6f | 20 74 68 61 74 20 6b 65 |tized so| that ke|
|00003170| 79 20 70 72 65 73 73 65 | 73 20 66 6f 72 20 6c 6f |y presse|s for lo|
|00003180| 63 61 74 69 6f 6e 20 6d | 61 6b 65 20 73 65 6e 73 |cation m|ake sens|
|00003190| 65 2e 0d 09 2a 2a 09 09 | 09 09 09 49 66 20 74 79 |e...**..|...If ty|
|000031a0| 70 69 6e 67 20 62 79 20 | 74 68 65 20 75 73 65 72 |ping by |the user|
|000031b0| 20 69 73 20 66 61 73 74 | 20 65 6e 6f 75 67 68 2c | is fast| enough,|
|000031c0| 20 6d 75 6c 74 69 70 6c | 65 20 63 68 61 72 61 63 | multipl|e charac|
|000031d0| 74 65 72 73 20 77 69 6c | 6c 20 62 65 0d 09 2a 2a |ters wil|l be..**|
|000031e0| 09 09 09 09 09 75 73 65 | 64 20 66 6f 72 20 74 68 |.....use|d for th|
|000031f0| 65 20 70 6f 73 69 74 69 | 6f 6e 69 6e 67 2e 0d 09 |e positi|oning...|
|00003200| 2a 2a 09 63 6c 54 77 6f | 53 74 65 70 3a 09 09 57 |**.clTwo|Step:..W|
|00003210| 68 65 6e 20 75 73 69 6e | 67 20 49 73 43 74 6c 45 |hen usin|g IsCtlE|
|00003220| 76 65 6e 74 28 29 2c 20 | 79 6f 75 20 6d 61 79 20 |vent(), |you may |
|00003230| 77 61 6e 74 20 74 68 65 | 20 69 6e 69 74 69 61 6c |want the| initial|
|00003240| 20 63 6c 69 63 6b 20 6f | 6e 20 61 20 4c 69 73 74 | click o|n a List|
|00003250| 0d 09 2a 2a 09 09 09 09 | 09 63 6f 6e 74 72 6f 6c |..**....|.control|
|00003260| 20 74 6f 20 6a 75 73 74 | 20 73 65 6c 65 63 74 20 | to just| select |
|00003270| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 2c 20 6f 72 20 |the cont|rol, or |
|00003280| 79 6f 75 20 6d 61 79 20 | 77 69 73 68 20 74 68 65 |you may |wish the|
|00003290| 20 63 6c 69 63 6b 20 74 | 6f 20 73 74 61 72 74 0d | click t|o start.|
|000032a0| 09 2a 2a 09 09 09 09 09 | 74 72 61 63 6b 69 6e 67 |.**.....|tracking|
|000032b0| 20 69 6e 20 61 64 64 69 | 74 69 6f 6e 20 74 6f 20 | in addi|tion to |
|000032c0| 73 65 6c 65 63 74 69 6e | 67 20 74 68 65 20 63 6f |selectin|g the co|
|000032d0| 6e 74 72 6f 6c 2e 20 20 | 54 68 65 20 74 72 61 63 |ntrol. |The trac|
|000032e0| 6b 69 6e 67 20 69 73 0d | 09 2a 2a 09 09 09 09 09 |king is.|.**.....|
|000032f0| 63 6f 6e 73 69 64 65 72 | 65 64 20 74 68 65 20 73 |consider|ed the s|
|00003300| 65 63 6f 6e 64 20 73 74 | 65 70 2e 20 20 42 79 20 |econd st|ep. By |
|00003310| 73 65 74 74 69 6e 67 20 | 74 68 69 73 20 62 69 74 |setting |this bit|
|00003320| 2c 20 79 6f 75 20 69 6e | 64 69 63 61 74 65 20 74 |, you in|dicate t|
|00003330| 68 61 74 20 79 6f 75 0d | 09 2a 2a 09 09 09 09 09 |hat you.|.**.....|
|00003340| 77 61 6e 74 20 63 6f 6e | 74 72 6f 6c 20 73 65 6c |want con|trol sel|
|00003350| 65 63 74 69 6f 6e 20 61 | 6e 64 20 69 74 65 6d 20 |ection a|nd item |
|00003360| 73 65 6c 65 63 74 69 6f | 6e 20 74 6f 20 62 65 20 |selectio|n to be |
|00003370| 61 20 32 2d 73 74 65 70 | 20 70 72 6f 63 65 73 73 |a 2-step| process|
|00003380| 2e 0d 09 2a 2a 09 09 09 | 09 09 53 65 74 74 69 6e |...**...|..Settin|
|00003390| 67 20 74 68 69 73 20 62 | 69 74 20 6d 65 61 6e 73 |g this b|it means|
|000033a0| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 74 61 | that it| will ta|
|000033b0| 6b 65 20 32 20 73 65 70 | 61 72 61 74 65 20 63 6c |ke 2 sep|arate cl|
|000033c0| 69 63 6b 73 20 62 79 20 | 74 68 65 0d 09 2a 2a 09 |icks by |the..**.|
|000033d0| 09 09 09 09 75 73 65 72 | 20 74 6f 20 73 65 6c 65 |....user| to sele|
|000033e0| 63 74 20 61 6e 20 69 74 | 65 6d 20 69 6e 20 74 68 |ct an it|em in th|
|000033f0| 65 20 6c 69 73 74 20 69 | 66 20 74 68 65 20 6c 69 |e list i|f the li|
|00003400| 73 74 20 69 73 20 69 6e | 61 63 74 69 76 65 2e 0d |st is in|active..|
|00003410| 09 2a 2a 09 63 6c 48 61 | 73 47 72 6f 77 3a 09 09 |.**.clHa|sGrow:..|
|00003420| 54 68 69 73 20 6d 61 6b | 65 73 20 73 75 72 65 20 |This mak|es sure |
|00003430| 74 68 61 74 20 74 68 65 | 72 65 20 69 73 20 73 70 |that the|re is sp|
|00003440| 61 63 65 20 66 6f 72 20 | 74 68 65 20 67 72 6f 77 |ace for |the grow|
|00003450| 49 63 6f 6e 20 69 66 20 | 74 68 65 20 6c 69 73 74 |Icon if |the list|
|00003460| 0d 09 2a 2a 09 09 09 09 | 09 68 61 73 20 61 20 73 |..**....|.has a s|
|00003470| 63 72 6f 6c 6c 62 61 72 | 2e 20 20 49 66 20 74 68 |crollbar|. If th|
|00003480| 65 20 6c 69 73 74 20 6f | 63 63 75 70 69 65 73 20 |e list o|ccupies |
|00003490| 61 6e 20 65 6e 74 69 72 | 65 20 77 69 6e 64 6f 77 |an entir|e window|
|000034a0| 2c 20 74 68 65 6e 20 69 | 66 20 74 68 65 72 65 0d |, then i|f there.|
|000034b0| 09 2a 2a 09 09 09 09 09 | 69 73 20 6f 6e 6c 79 20 |.**.....|is only |
|000034c0| 6f 6e 65 20 73 63 72 6f | 6c 6c 62 61 72 2c 20 74 |one scro|llbar, t|
|000034d0| 68 65 20 73 63 72 6f 6c | 6c 62 61 72 20 68 61 73 |he scrol|lbar has|
|000034e0| 20 74 6f 20 62 65 20 73 | 68 72 75 6e 6b 20 74 6f | to be s|hrunk to|
|000034f0| 20 6d 61 6b 65 20 72 6f | 6f 6d 0d 09 2a 2a 09 09 | make ro|om..**..|
|00003500| 09 09 09 66 6f 72 20 74 | 68 65 20 67 72 6f 77 49 |...for t|he growI|
|00003510| 63 6f 6e 2e 20 20 54 68 | 65 20 4c 69 73 74 20 4d |con. Th|e List M|
|00003520| 61 6e 61 67 65 72 20 73 | 75 70 70 6f 73 65 64 6c |anager s|upposedl|
|00003530| 79 20 68 61 73 20 74 68 | 69 73 20 61 62 69 6c 69 |y has th|is abili|
|00003540| 74 79 2c 20 62 75 74 0d | 09 2a 2a 09 09 09 09 09 |ty, but.|.**.....|
|00003550| 69 74 20 64 6f 65 73 6e | 27 74 20 77 6f 72 6b 2e |it doesn|'t work.|
|00003560| 20 20 54 68 65 20 4c 69 | 73 74 20 63 6f 6e 74 72 | The Li|st contr|
|00003570| 6f 6c 20 6d 61 6e 61 67 | 65 73 20 69 74 20 63 6f |ol manag|es it co|
|00003580| 72 72 65 63 74 6c 79 2e | 0d 09 2a 2a 09 63 6c 44 |rrectly.|..**.clD|
|00003590| 72 61 77 49 74 3a 09 09 | 54 68 69 73 20 69 73 20 |rawIt:..|This is |
|000035a0| 61 20 4c 69 73 74 20 6d | 61 6e 61 67 65 72 20 66 |a List m|anager f|
|000035b0| 6c 61 67 20 74 68 61 74 | 20 69 73 20 6e 65 65 64 |lag that| is need|
|000035c0| 65 64 20 66 6f 72 20 74 | 68 65 20 4c 4e 65 77 28 |ed for t|he LNew(|
|000035d0| 29 20 63 61 6c 6c 2e 0d | 09 2a 2a 0d 09 2a 2a 0d |) call..|.**..**.|
|000035e0| 09 2a 2a 09 49 66 20 74 | 68 65 20 43 4c 4e 65 77 |.**.If t|he CLNew|
|000035f0| 20 63 61 6c 6c 20 73 75 | 63 63 65 65 64 73 2c 20 | call su|cceeds, |
|00003600| 79 6f 75 20 74 68 65 6e | 20 68 61 76 65 20 61 20 |you then| have a |
|00003610| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 20 69 6e 20 |List con|trol in |
|00003620| 79 6f 75 72 20 77 69 6e | 64 6f 77 2e 20 20 49 74 |your win|dow. It|
|00003630| 20 77 69 6c 6c 20 62 65 | 0d 09 2a 2a 09 61 75 74 | will be|..**.aut|
|00003640| 6f 6d 61 74 69 63 61 6c | 6c 79 20 64 69 73 70 6f |omatical|ly dispo|
|00003650| 73 65 64 20 6f 66 20 77 | 68 65 6e 20 79 6f 75 20 |sed of w|hen you |
|00003660| 63 6c 6f 73 65 20 74 68 | 65 20 77 69 6e 64 6f 77 |close th|e window|
|00003670| 2e 20 20 49 66 20 79 6f | 75 20 64 6f 6e 27 74 20 |. If yo|u don't |
|00003680| 77 61 6e 74 20 74 68 69 | 73 20 74 6f 20 68 61 70 |want thi|s to hap|
|00003690| 70 65 6e 2c 0d 09 2a 2a | 09 74 68 65 6e 20 79 6f |pen,..**|.then yo|
|000036a0| 75 20 63 61 6e 20 64 65 | 74 61 63 68 20 69 74 20 |u can de|tach it |
|000036b0| 66 72 6f 6d 20 74 68 65 | 20 76 69 65 77 20 63 6f |from the| view co|
|000036c0| 6e 74 72 6f 6c 20 77 68 | 69 63 68 20 6f 77 6e 73 |ntrol wh|ich owns|
|000036d0| 20 69 74 2e 20 20 54 6f | 20 64 6f 20 74 68 69 73 | it. To| do this|
|000036e0| 2c 20 79 6f 75 20 77 6f | 75 6c 64 20 74 6f 0d 09 |, you wo|uld to..|
|000036f0| 2a 2a 09 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |**.the f|ollowing|
|00003700| 3a 0d 09 2a 2a 0d 09 2a | 2a 09 09 76 69 65 77 43 |:..**..*|*..viewC|
|00003710| 74 6c 20 3d 20 43 4c 56 | 69 65 77 46 72 6f 6d 4c |tl = CLV|iewFromL|
|00003720| 69 73 74 28 74 68 65 4c | 69 73 74 48 6e 64 6c 29 |ist(theL|istHndl)|
|00003730| 3b 0d 09 2a 2a 09 09 69 | 66 20 28 76 69 65 77 43 |;..**..i|f (viewC|
|00003740| 74 6c 29 20 53 65 74 43 | 52 65 66 43 6f 6e 28 76 |tl) SetC|RefCon(v|
|00003750| 69 65 77 43 74 6c 2c 20 | 6e 69 6c 29 3b 0d 09 2a |iewCtl, |nil);..*|
|00003760| 2a 0d 09 2a 2a 09 54 68 | 65 20 76 69 65 77 20 63 |*..**.Th|e view c|
|00003770| 6f 6e 74 72 6f 6c 20 6b | 65 65 70 73 20 61 20 72 |ontrol k|eeps a r|
|00003780| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 74 68 65 20 |eference| to the |
|00003790| 4c 69 73 74 20 72 65 63 | 6f 72 64 20 69 6e 20 74 |List rec|ord in t|
|000037a0| 68 65 20 72 65 66 43 6f | 6e 2e 20 20 49 66 20 74 |he refCo|n. If t|
|000037b0| 68 65 20 72 65 66 43 6f | 6e 20 69 73 0d 09 2a 2a |he refCo|n is..**|
|000037c0| 09 63 6c 65 61 72 65 64 | 2c 20 74 68 65 6e 20 74 |.cleared|, then t|
|000037d0| 68 65 20 76 69 65 77 20 | 63 6f 6e 74 72 6f 6c 20 |he view |control |
|000037e0| 64 6f 65 73 20 6e 6f 74 | 68 69 6e 67 2e 20 20 53 |does not|hing. S|
|000037f0| 6f 2c 20 61 6c 6c 20 74 | 68 61 74 20 69 73 20 6e |o, all t|hat is n|
|00003800| 65 65 64 65 64 20 74 6f | 20 64 65 74 61 63 68 20 |eeded to| detach |
|00003810| 61 20 4c 69 73 74 0d 09 | 2a 2a 09 72 65 63 6f 72 |a List..|**.recor|
|00003820| 64 20 66 72 6f 6d 20 61 | 20 76 69 65 77 20 63 6f |d from a| view co|
|00003830| 6e 74 72 6f 6c 20 69 73 | 20 74 6f 20 73 65 74 20 |ntrol is| to set |
|00003840| 74 68 65 20 76 69 65 77 | 20 63 6f 6e 74 72 6f 6c |the view| control|
|00003850| 27 73 20 72 65 66 43 6f | 6e 20 6e 69 6c 2e 20 20 |'s refCo|n nil. |
|00003860| 4e 6f 77 20 69 66 20 79 | 6f 75 20 63 6c 6f 73 65 |Now if y|ou close|
|00003870| 20 74 68 65 0d 09 2a 2a | 09 77 69 6e 64 6f 77 2c | the..**|.window,|
|00003880| 20 79 6f 75 20 77 69 6c | 6c 20 73 74 69 6c 6c 20 | you wil|l still |
|00003890| 68 61 76 65 20 74 68 65 | 20 4c 69 73 74 20 72 65 |have the| List re|
|000038a0| 63 6f 72 64 2e 0d 09 2a | 2a 0d 09 2a 2a 0d 09 2a |cord...*|*..**..*|
|000038b0| 2a 09 54 6f 20 72 65 6d | 6f 76 65 20 61 20 4c 69 |*.To rem|ove a Li|
|000038c0| 73 74 20 63 6f 6e 74 72 | 6f 6c 20 63 6f 6d 70 6c |st contr|ol compl|
|000038d0| 65 74 65 6c 79 20 66 72 | 6f 6d 20 61 20 77 69 6e |etely fr|om a win|
|000038e0| 64 6f 77 2c 20 6a 75 73 | 74 20 64 69 73 70 6f 73 |dow, jus|t dispos|
|000038f0| 65 20 6f 66 20 74 68 65 | 20 76 69 65 77 0d 09 2a |e of the| view..*|
|00003900| 2a 09 63 6f 6e 74 72 6f | 6c 20 74 68 61 74 20 68 |*.contro|l that h|
|00003910| 6f 6c 64 73 20 74 68 65 | 20 4c 69 73 74 20 72 65 |olds the| List re|
|00003920| 63 6f 72 64 2e 20 20 54 | 6f 20 64 6f 20 74 68 69 |cord. T|o do thi|
|00003930| 73 2c 20 6a 75 73 74 20 | 64 6f 20 73 6f 6d 65 74 |s, just |do somet|
|00003940| 68 69 6e 67 20 6c 69 6b | 65 20 74 68 65 20 62 65 |hing lik|e the be|
|00003950| 6c 6f 77 3a 0d 09 2a 2a | 0d 09 2a 2a 09 09 44 69 |low:..**|..**..Di|
|00003960| 73 70 6f 73 65 43 6f 6e | 74 72 6f 6c 28 43 4c 56 |sposeCon|trol(CLV|
|00003970| 69 65 77 46 72 6f 6d 4c | 69 73 74 28 74 68 65 4c |iewFromL|ist(theL|
|00003980| 69 73 74 48 6e 64 6c 29 | 29 3b 0d 09 2a 2a 0d 09 |istHndl)|);..**..|
|00003990| 2a 2a 09 54 68 69 73 20 | 63 6f 6d 70 6c 65 74 65 |**.This |complete|
|000039a0| 6c 79 20 64 69 73 70 6f | 73 65 73 20 6f 66 20 74 |ly dispo|ses of t|
|000039b0| 68 65 20 4c 69 73 74 20 | 63 6f 6e 74 72 6f 6c 2e |he List |control.|
|000039c0| 0d 09 2a 2a 0d 09 2a 2a | 0d 09 2a 2a 09 45 76 65 |..**..**|..**.Eve|
|000039d0| 6e 74 73 20 66 6f 72 20 | 74 68 65 20 4c 69 73 74 |nts for |the List|
|000039e0| 20 72 65 63 6f 72 64 20 | 61 72 65 20 68 61 6e 64 | record |are hand|
|000039f0| 6c 65 64 20 6e 65 61 72 | 6c 79 20 61 75 74 6f 6d |led near|ly autom|
|00003a00| 61 74 69 63 61 6c 6c 79 | 2e 20 20 4a 75 73 74 20 |atically|. Just |
|00003a10| 6d 61 6b 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |make the| followi|
|00003a20| 6e 67 20 63 61 6c 6c 3a | 0d 09 2a 2a 0d 09 2a 2a |ng call:|..**..**|
|00003a30| 09 09 43 4c 45 76 65 6e | 74 28 77 69 6e 64 6f 77 |..CLEven|t(window|
|00003a40| 2c 20 65 76 65 6e 74 50 | 74 72 2c 20 26 61 63 74 |, eventP|tr, &act|
|00003a50| 69 6f 6e 29 3b 0d 09 2a | 2a 0d 09 2a 2a 09 49 66 |ion);..*|*..**.If|
|00003a60| 20 74 68 65 20 65 76 65 | 6e 74 20 77 61 73 20 68 | the eve|nt was h|
|00003a70| 61 6e 64 6c 65 64 2c 20 | 74 72 75 65 20 69 73 20 |andled, |true is |
|00003a80| 72 65 74 75 72 6e 65 64 | 2e 20 20 49 66 20 74 68 |returned|. If th|
|00003a90| 65 20 65 76 65 6e 74 20 | 69 73 20 66 61 6c 73 65 |e event |is false|
|00003aa0| 2c 20 74 68 65 6e 20 74 | 68 65 20 65 76 65 6e 74 |, then t|he event|
|00003ab0| 20 64 6f 65 73 6e 27 74 | 0d 09 2a 2a 09 62 65 6c | doesn't|..**.bel|
|00003ac0| 6f 6e 67 20 74 6f 20 61 | 20 4c 69 73 74 20 63 6f |ong to a| List co|
|00003ad0| 6e 74 72 6f 6c 2c 20 61 | 6e 64 20 66 75 72 74 68 |ntrol, a|nd furth|
|00003ae0| 65 72 20 70 72 6f 63 65 | 73 73 69 6e 67 20 6f 66 |er proce|ssing of|
|00003af0| 20 74 68 65 20 65 76 65 | 6e 74 20 73 68 6f 75 6c | the eve|nt shoul|
|00003b00| 64 20 62 65 20 64 6f 6e | 65 2e 0d 09 2a 2f 0d 0d |d be don|e...*/..|
|00003b10| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 09 43 4c |ControlH|andle.CL|
|00003b20| 4e 65 78 74 28 57 69 6e | 64 6f 77 50 74 72 20 77 |Next(Win|dowPtr w|
|00003b30| 69 6e 64 6f 77 2c 20 4c | 69 73 74 48 61 6e 64 6c |indow, L|istHandl|
|00003b40| 65 20 2a 6c 69 73 74 48 | 6e 64 6c 2c 20 43 6f 6e |e *listH|ndl, Con|
|00003b50| 74 72 6f 6c 48 61 6e 64 | 6c 65 20 63 74 6c 2c 0d |trolHand|le ctl,.|
|00003b60| 09 09 09 09 09 20 20 20 | 73 68 6f 72 74 20 64 69 |..... |short di|
|00003b70| 72 2c 20 42 6f 6f 6c 65 | 61 6e 20 6a 75 73 74 41 |r, Boole|an justA|
|00003b80| 63 74 69 76 65 29 3b 0d | 09 2f 2a 0d 09 2a 2a 09 |ctive);.|./*..**.|
|00003b90| a6 20 47 65 74 20 74 68 | 65 20 6e 65 78 74 20 4c |. Get th|e next L|
|00003ba0| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 20 69 6e 20 74 |ist cont|rol in t|
|00003bb0| 68 65 20 77 69 6e 64 6f | 77 2e 0d 09 2a 2a 0d 09 |he windo|w...**..|
|00003bc0| 2a 2a 09 49 4e 50 55 54 | 3a 09 77 69 6e 64 6f 77 |**.INPUT|:.window|
|00003bd0| 09 09 09 54 68 65 20 77 | 69 6e 64 6f 77 20 74 6f |...The w|indow to|
|00003be0| 20 63 68 65 63 6b 20 66 | 6f 72 20 61 20 4c 69 73 | check f|or a Lis|
|00003bf0| 74 20 63 6f 6e 74 72 6f | 6c 20 6b 65 79 70 72 65 |t contro|l keypre|
|00003c00| 73 73 20 69 6e 2e 0d 09 | 2a 2a 09 09 09 63 74 6c |ss in...|**...ctl|
|00003c10| 09 09 09 09 54 68 65 20 | 6c 61 73 74 20 63 6f 6e |....The |last con|
|00003c20| 74 72 6f 6c 20 66 6f 75 | 6e 64 20 28 6e 69 6c 20 |trol fou|nd (nil |
|00003c30| 73 65 61 72 63 68 73 20 | 66 72 6f 6d 20 62 65 67 |searchs |from beg|
|00003c40| 69 6e 6e 69 6e 67 20 6f | 66 20 63 6f 6e 74 72 6f |inning o|f contro|
|00003c50| 6c 20 6c 69 73 74 29 2e | 0d 09 2a 2a 09 09 09 64 |l list).|..**...d|
|00003c60| 69 72 09 09 09 09 53 65 | 61 72 63 68 20 64 69 72 |ir....Se|arch dir|
|00003c70| 65 63 74 69 6f 6e 20 28 | 31 20 66 6f 72 20 66 6f |ection (|1 for fo|
|00003c80| 72 77 61 72 64 2c 20 2d | 31 20 66 6f 72 20 62 61 |rward, -|1 for ba|
|00003c90| 63 6b 77 61 72 64 29 2e | 0d 09 2a 2a 09 09 09 6a |ckward).|..**...j|
|00003ca0| 75 73 74 41 63 74 69 76 | 65 09 09 54 72 75 65 20 |ustActiv|e..True |
|00003cb0| 69 66 20 6f 6e 6c 79 20 | 61 63 74 69 76 65 2c 20 |if only |active, |
|00003cc0| 76 69 73 69 62 6c 65 20 | 63 6f 6e 74 72 6f 6c 73 |visible |controls|
|00003cd0| 20 73 68 6f 75 6c 64 20 | 62 65 20 72 65 74 75 72 | should |be retur|
|00003ce0| 6e 65 64 2e 0d 09 2a 2a | 09 52 45 53 55 4c 54 3a |ned...**|.RESULT:|
|00003cf0| 09 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 09 4e |.Control|Handle.N|
|00003d00| 65 78 74 20 63 6f 6e 74 | 72 6f 6c 20 66 6f 75 6e |ext cont|rol foun|
|00003d10| 64 2c 20 62 61 73 65 64 | 20 6f 6e 20 63 72 69 74 |d, based| on crit|
|00003d20| 65 72 69 61 2e 0d 09 2a | 2a 0d 09 2a 2a 09 47 65 |eria...*|*..**.Ge|
|00003d30| 74 20 74 68 65 20 6e 65 | 78 74 20 4c 69 73 74 20 |t the ne|xt List |
|00003d40| 63 6f 6e 74 72 6f 6c 20 | 69 6e 20 74 68 65 20 77 |control |in the w|
|00003d50| 69 6e 64 6f 77 2e 20 20 | 59 6f 75 20 70 61 73 73 |indow. |You pass|
|00003d60| 20 69 74 20 61 20 63 6f | 6e 74 72 6f 6c 20 68 61 | it a co|ntrol ha|
|00003d70| 6e 64 6c 65 20 66 6f 72 | 20 74 68 65 20 76 69 65 |ndle for| the vie|
|00003d80| 77 20 63 6f 6e 74 72 6f | 6c 2c 0d 09 2a 2a 09 6f |w contro|l,..**.o|
|00003d90| 72 20 6e 69 6c 20 74 6f | 20 73 74 61 72 74 20 61 |r nil to| start a|
|00003da0| 74 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |t the be|ginning |
|00003db0| 6f 66 20 74 68 65 20 77 | 69 6e 64 6f 77 2e 20 20 |of the w|indow. |
|00003dc0| 49 74 20 72 65 74 75 72 | 6e 73 20 62 6f 74 68 20 |It retur|ns both |
|00003dd0| 61 20 4c 69 73 74 20 68 | 61 6e 64 6c 65 20 61 6e |a List h|andle an|
|00003de0| 64 20 74 68 65 20 76 69 | 65 77 0d 09 2a 2a 09 63 |d the vi|ew..**.c|
|00003df0| 6f 6e 74 72 6f 6c 20 68 | 61 6e 64 6c 65 20 66 6f |ontrol h|andle fo|
|00003e00| 72 20 74 68 61 74 20 4c | 69 73 74 20 72 65 63 6f |r that L|ist reco|
|00003e10| 72 64 2e 20 20 49 66 20 | 6e 6f 6e 65 20 69 73 20 |rd. If |none is |
|00003e20| 66 6f 75 6e 64 2c 20 6e | 69 6c 20 69 73 20 72 65 |found, n|il is re|
|00003e30| 74 75 72 6e 65 64 2e 20 | 20 54 68 69 73 20 61 6c |turned. | This al|
|00003e40| 6c 6f 77 73 20 79 6f 75 | 20 74 6f 0d 09 2a 2a 09 |lows you| to..**.|
|00003e50| 72 65 70 65 61 74 65 64 | 6c 79 20 63 61 6c 6c 20 |repeated|ly call |
|00003e60| 74 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 61 6e |this fun|ction an|
|00003e70| 64 20 77 61 6c 6b 20 74 | 68 72 6f 75 67 68 20 61 |d walk t|hrough a|
|00003e80| 6c 6c 20 74 68 65 20 4c | 69 73 74 20 63 6f 6e 74 |ll the L|ist cont|
|00003e90| 72 6f 6c 73 20 69 6e 20 | 61 20 77 69 6e 64 6f 77 |rols in |a window|
|00003ea0| 2e 20 2a 2f 0d 0d 76 6f | 69 64 09 09 09 43 4c 50 |. */..vo|id...CLP|
|00003eb0| 72 69 6e 74 28 52 67 6e | 48 61 6e 64 6c 65 20 63 |rint(Rgn|Handle c|
|00003ec0| 6c 69 70 52 67 6e 2c 20 | 4c 69 73 74 48 61 6e 64 |lipRgn, |ListHand|
|00003ed0| 6c 65 20 6c 69 73 74 48 | 6e 64 6c 2c 20 73 68 6f |le listH|ndl, sho|
|00003ee0| 72 74 20 2a 72 6f 77 2c | 20 73 68 6f 72 74 20 2a |rt *row,| short *|
|00003ef0| 63 6f 6c 2c 0d 09 09 09 | 09 09 09 73 68 6f 72 74 |col,....|...short|
|00003f00| 20 6c 65 66 74 45 64 67 | 65 2c 20 52 65 63 74 20 | leftEdg|e, Rect |
|00003f10| 2a 64 72 61 77 52 63 74 | 29 3b 0d 09 2f 2a 0d 09 |*drawRct|);../*..|
|00003f20| 2a 2a 09 a6 20 50 72 69 | 6e 74 20 4c 69 73 74 20 |**.. Pri|nt List |
|00003f30| 43 6f 6e 74 72 6f 6c 20 | 63 65 6c 6c 73 20 69 6e |Control |cells in|
|00003f40| 74 6f 20 74 68 65 20 64 | 65 73 69 67 6e 61 74 65 |to the d|esignate|
|00003f50| 64 20 72 65 63 74 61 6e | 67 6c 65 2e 0d 09 2a 2a |d rectan|gle...**|
|00003f60| 0d 09 2a 2a 09 49 4e 50 | 55 54 3a 09 63 6c 69 70 |..**.INP|UT:.clip|
|00003f70| 52 67 6e 09 09 09 52 65 | 67 69 6f 6e 20 74 6f 20 |Rgn...Re|gion to |
|00003f80| 63 6c 69 70 20 6f 75 74 | 70 75 74 20 74 6f 2e 0d |clip out|put to..|
|00003f90| 09 2a 2a 09 09 09 6c 69 | 73 74 48 6e 64 6c 09 09 |.**...li|stHndl..|
|00003fa0| 4c 69 73 74 20 74 6f 20 | 70 72 69 6e 74 2e 0d 09 |List to |print...|
|00003fb0| 2a 2a 09 09 09 6c 65 66 | 74 45 64 67 65 09 09 44 |**...lef|tEdge..D|
|00003fc0| 6f 6e d5 74 20 70 72 69 | 6e 74 20 63 65 6c 6c 73 |on.t pri|nt cells|
|00003fd0| 20 6c 65 66 74 20 6f 66 | 20 74 68 69 73 20 63 6f | left of| this co|
|00003fe0| 6c 75 6d 6e 2e 0d 09 2a | 2a 09 49 4e 2f 4f 55 54 |lumn...*|*.IN/OUT|
|00003ff0| 09 72 6f 77 09 09 09 09 | 53 74 61 72 74 69 6e 67 |.row....|Starting|
|00004000| 20 72 6f 77 20 74 6f 20 | 70 72 69 6e 74 20 28 66 | row to |print (f|
|00004010| 69 72 73 74 20 72 6f 77 | 20 6e 6f 74 20 70 72 69 |irst row| not pri|
|00004020| 6e 74 65 64 20 72 65 74 | 75 72 6e 65 64 20 68 65 |nted ret|urned he|
|00004030| 72 65 29 2e 0d 09 2a 2a | 09 09 09 63 6f 6c 09 09 |re)...**|...col..|
|00004040| 09 09 53 74 61 72 74 69 | 6e 67 20 63 6f 6c 75 6d |..Starti|ng colum|
|00004050| 6e 20 74 6f 20 70 72 69 | 6e 74 20 28 66 69 72 73 |n to pri|nt (firs|
|00004060| 74 20 63 6f 6c 75 6d 6e | 20 6e 6f 74 20 70 72 69 |t column| not pri|
|00004070| 6e 74 65 64 20 72 65 74 | 75 72 6e 65 64 20 68 65 |nted ret|urned he|
|00004080| 72 65 29 2e 0d 09 2a 2a | 09 09 09 64 72 61 77 52 |re)...**|...drawR|
|00004090| 63 74 09 09 09 50 72 69 | 6e 74 20 63 65 6c 6c 73 |ct...Pri|nt cells|
|000040a0| 20 69 6e 73 69 64 65 20 | 72 65 63 74 2e 20 20 52 | inside |rect. R|
|000040b0| 65 63 74 20 69 73 20 61 | 6c 73 6f 20 73 68 72 75 |ect is a|lso shru|
|000040c0| 6e 6b 20 74 6f 20 62 6f | 75 6e 64 20 74 68 65 0d |nk to bo|und the.|
|000040d0| 09 2a 2a 09 09 09 09 09 | 09 09 63 65 6c 6c 73 20 |.**.....|..cells |
|000040e0| 74 68 61 74 20 64 69 64 | 20 70 72 69 6e 74 2e 0d |that did| print..|
|000040f0| 09 2a 2a 0d 09 2a 2a 09 | 46 72 6f 6d 20 74 68 65 |.**..**.|From the|
|00004100| 20 73 74 61 72 74 69 6e | 67 20 72 6f 77 20 6f 72 | startin|g row or|
|00004110| 20 63 6f 6c 75 6d 6e 2c | 20 70 72 69 6e 74 20 61 | column,| print a|
|00004120| 73 20 6d 61 6e 79 20 63 | 65 6c 6c 73 20 61 73 20 |s many c|ells as |
|00004130| 77 69 6c 6c 20 66 69 74 | 20 69 6e 74 6f 20 74 68 |will fit| into th|
|00004140| 65 20 64 65 73 69 67 6e | 61 74 65 64 20 72 65 63 |e design|ated rec|
|00004150| 74 2e 0d 09 2a 2a 09 50 | 61 73 73 20 69 6e 20 61 |t...**.P|ass in a|
|00004160| 20 73 74 61 72 74 69 6e | 67 20 72 6f 77 20 61 6e | startin|g row an|
|00004170| 64 20 63 6f 6c 75 6d 6e | 2c 20 61 6e 64 20 74 68 |d column|, and th|
|00004180| 65 79 20 77 69 6c 6c 20 | 62 65 20 61 64 6a 75 73 |ey will |be adjus|
|00004190| 74 65 64 20 74 6f 20 69 | 6e 64 69 63 61 74 65 20 |ted to i|ndicate |
|000041a0| 74 68 65 20 66 69 72 73 | 74 20 63 65 6c 6c 0d 09 |the firs|t cell..|
|000041b0| 2a 2a 09 74 68 61 74 20 | 64 69 64 6e 27 74 20 66 |**.that |didn't f|
|000041c0| 69 74 20 69 6e 74 6f 20 | 74 68 65 20 72 65 63 74 |it into |the rect|
|000041d0| 2e 20 20 49 66 20 61 6c | 6c 20 72 65 6d 61 69 6e |. If al|l remain|
|000041e0| 69 6e 67 20 63 65 6c 6c | 73 20 77 65 72 65 20 70 |ing cell|s were p|
|000041f0| 72 69 6e 74 65 64 2c 20 | 74 68 65 20 72 6f 77 20 |rinted, |the row |
|00004200| 69 73 20 72 65 74 75 72 | 6e 65 64 0d 09 2a 2a 09 |is retur|ned..**.|
|00004210| 61 73 20 2d 31 2e 20 20 | 54 68 65 20 62 6f 74 74 |as -1. |The bott|
|00004220| 6f 6d 20 6f 66 20 74 68 | 65 20 72 65 63 74 20 74 |om of th|e rect t|
|00004230| 6f 20 70 72 69 6e 74 20 | 69 6e 20 69 73 20 61 6c |o print |in is al|
|00004240| 73 6f 20 61 64 6a 75 73 | 74 65 64 20 74 6f 20 69 |so adjus|ted to i|
|00004250| 6e 64 69 63 61 74 65 20 | 77 68 65 72 65 20 74 68 |ndicate |where th|
|00004260| 65 20 61 63 74 75 61 6c | 0d 09 2a 2a 09 63 75 74 |e actual|..**.cut|
|00004270| 2d 6f 66 66 20 70 6f 69 | 6e 74 20 77 61 73 2e 20 |-off poi|nt was. |
|00004280| 2a 2f 0d 0d 73 68 6f 72 | 74 09 09 09 43 4c 52 6f |*/..shor|t...CLRo|
|00004290| 77 4f 72 43 6f 6c 53 65 | 61 72 63 68 28 4c 69 73 |wOrColSe|arch(Lis|
|000042a0| 74 48 61 6e 64 6c 65 20 | 6c 69 73 74 48 6e 64 6c |tHandle |listHndl|
|000042b0| 2c 20 76 6f 69 64 20 2a | 64 61 74 61 2c 20 73 68 |, void *|data, sh|
|000042c0| 6f 72 74 20 64 61 74 61 | 4c 65 6e 2c 0d 09 09 09 |ort data|Len,....|
|000042d0| 09 09 09 09 09 20 73 68 | 6f 72 74 20 72 6f 77 2c |..... sh|ort row,|
|000042e0| 20 73 68 6f 72 74 20 63 | 6f 6c 29 3b 0d 09 2f 2a | short c|ol);../*|
|000042f0| 0d 09 2a 2a 09 a6 20 46 | 69 6e 64 20 74 68 65 20 |..**.. F|ind the |
|00004300| 6c 6f 63 61 74 69 6f 6e | 20 69 6e 20 74 68 65 20 |location| in the |
|00004310| 6c 69 73 74 20 77 68 65 | 72 65 20 74 68 65 20 64 |list whe|re the d|
|00004320| 61 74 61 20 77 6f 75 6c | 64 20 62 65 6c 6f 6e 67 |ata woul|d belong|
|00004330| 20 69 66 20 69 6e 73 65 | 72 74 65 64 2e 0d 09 2a | if inse|rted...*|
|00004340| 2a 0d 09 2a 2a 09 49 4e | 50 55 54 3a 09 6c 69 73 |*..**.IN|PUT:.lis|
|00004350| 74 48 6e 64 6c 09 09 4c | 69 73 74 20 74 6f 20 73 |tHndl..L|ist to s|
|00004360| 65 61 72 63 68 2e 0d 09 | 2a 2a 09 09 09 64 61 74 |earch...|**...dat|
|00004370| 61 09 09 09 50 6f 69 6e | 74 65 72 20 74 6f 20 64 |a...Poin|ter to d|
|00004380| 61 74 61 20 74 6f 20 73 | 65 61 72 63 68 20 66 6f |ata to s|earch fo|
|00004390| 72 2c 20 6f 66 20 77 68 | 61 74 65 76 65 72 20 74 |r, of wh|atever t|
|000043a0| 79 70 65 2e 0d 09 2a 2a | 09 09 09 64 61 74 61 4c |ype...**|...dataL|
|000043b0| 65 6e 09 09 09 4c 65 6e | 67 74 68 20 6f 66 20 64 |en...Len|gth of d|
|000043c0| 61 74 61 20 74 6f 20 73 | 65 61 72 63 68 20 66 6f |ata to s|earch fo|
|000043d0| 72 2e 0d 09 2a 2a 09 09 | 09 72 6f 77 09 09 09 09 |r...**..|.row....|
|000043e0| 52 6f 77 20 74 6f 20 72 | 65 73 74 72 69 63 74 20 |Row to r|estrict |
|000043f0| 73 65 61 72 63 68 20 74 | 6f 2c 20 6f 72 20 2d 31 |search t|o, or -1|
|00004400| 20 69 66 20 64 6f 69 6e | 67 20 72 6f 77 20 73 65 | if doin|g row se|
|00004410| 61 72 63 68 2e 0d 09 2a | 2a 09 09 09 63 6f 6c 09 |arch...*|*...col.|
|00004420| 09 09 09 43 6f 6c 75 6d | 6e 20 74 6f 20 72 65 73 |...Colum|n to res|
|00004430| 74 72 69 63 74 20 73 65 | 61 72 63 68 20 74 6f 2c |trict se|arch to,|
|00004440| 20 6f 72 20 2d 31 20 69 | 66 20 64 6f 69 6e 67 20 | or -1 i|f doing |
|00004450| 63 6f 6c 75 6d 6e 20 73 | 65 61 72 63 68 2e 0d 09 |column s|earch...|
|00004460| 2a 2a 09 52 45 53 55 4c | 54 3a 09 73 68 6f 72 74 |**.RESUL|T:.short|
|00004470| 09 09 09 49 6e 73 65 72 | 74 69 6f 6e 20 6c 6f 63 |...Inser|tion loc|
|00004480| 61 74 69 6f 6e 20 66 6f | 72 20 65 69 74 68 65 72 |ation fo|r either|
|00004490| 20 72 6f 77 20 6f 72 20 | 63 6f 6c 75 6d 6e 2e 0d | row or |column..|
|000044a0| 09 2a 2a 0d 09 2a 2a 09 | 46 69 6e 64 20 74 68 65 |.**..**.|Find the|
|000044b0| 20 6c 6f 63 61 74 69 6f | 6e 20 69 6e 20 74 68 65 | locatio|n in the|
|000044c0| 20 6c 69 73 74 20 77 68 | 65 72 65 20 74 68 65 20 | list wh|ere the |
|000044d0| 64 61 74 61 20 77 6f 75 | 6c 64 20 62 65 6c 6f 6e |data wou|ld belon|
|000044e0| 67 20 69 66 20 69 6e 73 | 65 72 74 65 64 2e 20 20 |g if ins|erted. |
|000044f0| 54 68 65 20 72 6f 77 20 | 61 6e 64 20 63 6f 6c 75 |The row |and colu|
|00004500| 6d 6e 0d 09 2a 2a 09 61 | 72 65 20 70 61 73 73 65 |mn..**.a|re passe|
|00004510| 64 20 69 6e 2e 20 20 49 | 66 20 65 69 74 68 65 72 |d in. I|f either|
|00004520| 20 69 73 20 2d 31 2c 20 | 74 68 61 74 20 69 73 20 | is -1, |that is |
|00004530| 74 68 65 20 64 69 6d 65 | 6e 73 69 6f 6e 20 74 68 |the dime|nsion th|
|00004540| 61 74 20 77 69 6c 6c 20 | 62 65 20 64 65 74 65 72 |at will |be deter|
|00004550| 6d 69 6e 65 64 20 61 6e | 64 20 72 65 74 75 72 6e |mined an|d return|
|00004560| 65 64 2e 0d 09 2a 2a 09 | 54 68 65 20 74 77 6f 20 |ed...**.|The two |
|00004570| 63 6f 6d 70 61 72 69 73 | 6f 6e 20 70 72 6f 63 73 |comparis|on procs|
|00004580| 20 67 65 74 43 6f 6d 70 | 61 72 65 44 61 74 61 20 | getComp|areData |
|00004590| 61 6e 64 20 64 6f 43 6f | 6d 70 61 72 65 44 61 74 |and doCo|mpareDat|
|000045a0| 61 20 61 72 65 20 75 73 | 65 64 20 69 6e 20 74 68 |a are us|ed in th|
|000045b0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 2e 0d 09 2a 2a |is funct|ion...**|
|000045c0| 0d 09 2a 2a 09 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 0d |..**.___|_______.|
|000045d0| 09 2a 2a 0d 09 2a 2a 09 | 41 6c 73 6f 20 73 65 65 |.**..**.|Also see|
|000045e0| 3a 09 43 4c 49 6e 73 65 | 72 74 2e 20 2a 2f 0d 0d |:.CLInse|rt. */..|
|000045f0| 76 6f 69 64 09 09 09 43 | 4c 55 70 64 61 74 65 28 |void...C|LUpdate(|
|00004600| 52 67 6e 48 61 6e 64 6c | 65 20 63 6c 69 70 52 67 |RgnHandl|e clipRg|
|00004610| 6e 2c 20 4c 69 73 74 48 | 61 6e 64 6c 65 20 6c 69 |n, ListH|andle li|
|00004620| 73 74 29 3b 0d 09 2f 2a | 0d 09 2a 2a 09 a6 20 44 |st);../*|..**.. D|
|00004630| 72 61 77 20 74 68 65 20 | 4c 69 73 74 20 63 6f 6e |raw the |List con|
|00004640| 74 72 6f 6c 20 69 6e 20 | 74 68 65 20 63 6f 72 72 |trol in |the corr|
|00004650| 65 63 74 20 6d 6f 64 65 | 2e 0d 09 2a 2a 0d 09 2a |ect mode|...**..*|
|00004660| 2a 09 49 4e 50 55 54 3a | 09 63 6c 69 70 52 67 6e |*.INPUT:|.clipRgn|
|00004670| 09 09 44 72 61 77 20 6f | 6e 6c 79 20 77 69 74 68 |..Draw o|nly with|
|00004680| 69 6e 20 74 68 69 73 20 | 72 65 67 69 6f 6e 2e 0d |in this |region..|
|00004690| 09 2a 2a 09 09 09 6c 69 | 73 74 09 09 4c 69 73 74 |.**...li|st..List|
|000046a0| 20 74 6f 20 64 72 61 77 | 2e 0d 09 2a 2a 0d 09 2a | to draw|...**..*|
|000046b0| 2a 09 44 72 61 77 20 74 | 68 65 20 4c 69 73 74 20 |*.Draw t|he List |
|000046c0| 63 6f 6e 74 72 6f 6c 20 | 69 6e 20 74 68 65 20 63 |control |in the c|
|000046d0| 6f 72 72 65 63 74 20 6d | 6f 64 65 2e 20 2a 2f 0d |orrect m|ode. */.|
|000046e0| 0d 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 09 43 |.Control|Handle.C|
|000046f0| 4c 56 69 65 77 46 72 6f | 6d 4c 69 73 74 28 4c 69 |LViewFro|mList(Li|
|00004700| 73 74 48 61 6e 64 6c 65 | 20 6c 69 73 74 48 6e 64 |stHandle| listHnd|
|00004710| 6c 29 3b 0d 09 2f 2a 0d | 09 2a 2a 09 a6 20 47 69 |l);../*.|.**.. Gi|
|00004720| 76 65 6e 20 61 20 6c 69 | 73 74 2c 20 72 65 74 75 |ven a li|st, retu|
|00004730| 72 6e 20 74 68 65 20 72 | 65 6c 61 74 65 64 20 77 |rn the r|elated w|
|00004740| 72 61 70 70 65 72 20 63 | 6f 6e 74 72 6f 6c 2e 0d |rapper c|ontrol..|
|00004750| 09 2a 2a 0d 09 2a 2a 09 | 49 4e 50 55 54 3a 09 6c |.**..**.|INPUT:.l|
|00004760| 69 73 74 48 6e 64 6c 09 | 09 4c 69 73 74 20 61 73 |istHndl.|.List as|
|00004770| 73 75 6d 61 62 6c 79 20 | 77 72 61 70 70 65 64 20 |sumably |wrapped |
|00004780| 62 79 20 61 20 63 6f 6e | 74 72 6f 6c 2e 0d 09 2a |by a con|trol...*|
|00004790| 2a 09 52 45 53 55 4c 54 | 3a 09 43 6f 6e 74 72 6f |*.RESULT|:.Contro|
|000047a0| 6c 48 61 6e 64 6c 65 09 | 43 6f 6e 74 72 6f 6c 20 |lHandle.|Control |
|000047b0| 77 72 61 70 70 69 6e 67 | 20 6c 69 73 74 20 28 6f |wrapping| list (o|
|000047c0| 72 20 6e 69 6c 20 69 66 | 20 6e 6f 6e 65 29 2e 0d |r nil if| none)..|
|000047d0| 09 2a 2a 0d 09 2a 2a 09 | 52 65 74 75 72 6e 20 74 |.**..**.|Return t|
|000047e0| 68 65 20 63 6f 6e 74 72 | 6f 6c 20 68 61 6e 64 6c |he contr|ol handl|
|000047f0| 65 20 66 6f 72 20 74 68 | 65 20 76 69 65 77 20 63 |e for th|e view c|
|00004800| 6f 6e 74 72 6f 6c 20 74 | 68 61 74 20 6f 77 6e 73 |ontrol t|hat owns|
|00004810| 20 74 68 65 20 4c 69 73 | 74 20 72 65 63 6f 72 64 | the Lis|t record|
|00004820| 2e 20 20 55 73 65 20 74 | 68 69 73 20 74 6f 20 66 |. Use t|his to f|
|00004830| 69 6e 64 0d 09 2a 2a 09 | 74 68 65 20 76 69 65 77 |ind..**.|the view|
|00004840| 20 74 6f 20 64 6f 20 63 | 75 73 74 6f 6d 69 7a 61 | to do c|ustomiza|
|00004850| 74 69 6f 6e 73 20 73 75 | 63 68 20 61 73 20 63 68 |tions su|ch as ch|
|00004860| 61 6e 67 69 6e 67 20 74 | 68 65 20 75 70 64 61 74 |anging t|he updat|
|00004870| 65 20 70 72 6f 63 65 64 | 75 72 65 20 66 6f 72 20 |e proced|ure for |
|00004880| 74 68 69 73 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f |this Lis|t contro|
|00004890| 6c 2e 20 2a 2f 0d 0d 4c | 69 73 74 48 61 6e 64 6c |l. */..L|istHandl|
|000048a0| 65 09 09 43 4c 57 69 6e | 64 41 63 74 69 76 61 74 |e..CLWin|dActivat|
|000048b0| 65 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |e(Window|Ptr wind|
|000048c0| 6f 77 2c 20 42 6f 6f 6c | 65 61 6e 20 64 69 73 70 |ow, Bool|ean disp|
|000048d0| 6c 61 79 49 74 29 3b 0d | 09 2f 2a 0d 09 2a 2a 09 |layIt);.|./*..**.|
|000048e0| a6 20 47 69 76 65 6e 20 | 61 20 6c 69 73 74 2c 20 |. Given |a list, |
|000048f0| 72 65 74 75 72 6e 20 74 | 68 65 20 72 65 6c 61 74 |return t|he relat|
|00004900| 65 64 20 77 72 61 70 70 | 65 72 20 63 6f 6e 74 72 |ed wrapp|er contr|
|00004910| 6f 6c 2e 0d 09 2a 2a 0d | 09 2a 2a 09 49 4e 50 55 |ol...**.|.**.INPU|
|00004920| 54 3a 09 6c 69 73 74 48 | 6e 64 6c 09 09 4c 69 73 |T:.listH|ndl..Lis|
|00004930| 74 20 61 73 73 75 6d 61 | 62 6c 79 20 77 72 61 70 |t assuma|bly wrap|
|00004940| 70 65 64 20 62 79 20 61 | 20 63 6f 6e 74 72 6f 6c |ped by a| control|
|00004950| 2e 0d 09 2a 2a 09 52 45 | 53 55 4c 54 3a 09 43 6f |...**.RE|SULT:.Co|
|00004960| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 09 43 6f 6e 74 |ntrolHan|dle.Cont|
|00004970| 72 6f 6c 20 77 72 61 70 | 70 69 6e 67 20 6c 69 73 |rol wrap|ping lis|
|00004980| 74 20 28 6f 72 20 6e 69 | 6c 20 69 66 20 6e 6f 6e |t (or ni|l if non|
|00004990| 65 29 2e 0d 09 2a 2a 0d | 09 2a 2a 09 54 68 69 73 |e)...**.|.**.This|
|000049a0| 20 77 69 6e 64 6f 77 20 | 69 73 20 62 65 63 6f 6d | window |is becom|
|000049b0| 69 6e 67 20 61 63 74 69 | 76 65 20 6f 72 20 69 6e |ing acti|ve or in|
|000049c0| 61 63 74 69 76 65 2e 20 | 20 54 68 65 20 62 6f 72 |active. | The bor|
|000049d0| 64 65 72 73 20 6f 66 20 | 74 68 65 20 4c 69 73 74 |ders of |the List|
|000049e0| 20 63 6f 6e 74 72 6f 6c | 73 20 6e 65 65 64 20 74 | control|s need t|
|000049f0| 6f 20 62 65 0d 09 2a 2a | 09 72 65 64 72 61 77 6e |o be..**|.redrawn|
|00004a00| 20 64 75 65 20 74 6f 20 | 74 68 69 73 2e 20 20 46 | due to |this. F|
|00004a10| 6f 72 20 65 61 63 68 20 | 4c 69 73 74 20 63 6f 6e |or each |List con|
|00004a20| 74 72 6f 6c 20 69 6e 20 | 74 68 65 20 77 69 6e 64 |trol in |the wind|
|00004a30| 6f 77 2c 20 72 65 64 72 | 61 77 20 74 68 65 20 61 |ow, redr|aw the a|
|00004a40| 63 74 69 76 65 20 62 6f | 72 64 65 72 2e 20 2a 2f |ctive bo|rder. */|
|00004a50| 0d 0d 76 6f 69 64 09 09 | 09 43 4c 53 69 7a 65 28 |..void..|.CLSize(|
|00004a60| 4c 69 73 74 48 61 6e 64 | 6c 65 20 6c 69 73 74 2c |ListHand|le list,|
|00004a70| 20 73 68 6f 72 74 20 6e | 65 77 48 2c 20 73 68 6f | short n|ewH, sho|
|00004a80| 72 74 20 6e 65 77 56 29 | 3b 0d 09 2f 2a 0d 09 2a |rt newV)|;../*..*|
|00004a90| 2a 09 a6 20 52 65 73 69 | 7a 65 20 74 68 65 20 63 |*.. Resi|ze the c|
|00004aa0| 6f 6e 74 72 6f 6c 20 61 | 6e 64 20 72 65 6c 61 74 |ontrol a|nd relat|
|00004ab0| 65 64 20 74 68 69 6e 67 | 73 2e 0d 09 2a 2a 0d 09 |ed thing|s...**..|
|00004ac0| 2a 2a 09 49 4e 50 55 54 | 3a 09 6c 69 73 74 09 09 |**.INPUT|:.list..|
|00004ad0| 4c 69 73 74 20 74 6f 20 | 72 65 73 69 7a 65 2e 0d |List to |resize..|
|00004ae0| 09 2a 2a 09 09 09 6e 65 | 77 48 09 09 4e 65 77 20 |.**...ne|wH..New |
|00004af0| 77 69 64 74 68 20 66 6f | 72 20 63 6f 6e 74 72 6f |width fo|r contro|
|00004b00| 6c 2e 0d 09 2a 2a 09 09 | 09 6e 65 77 56 09 09 4e |l...**..|.newV..N|
|00004b10| 65 77 20 68 65 69 67 68 | 74 20 66 6f 72 20 63 6f |ew heigh|t for co|
|00004b20| 6e 74 72 6f 6c 2e 0d 09 | 2a 2a 0d 09 2a 2a 09 54 |ntrol...|**..**.T|
|00004b30| 68 69 73 20 72 65 73 69 | 7a 65 73 20 74 68 65 20 |his resi|zes the |
|00004b40| 6c 69 73 74 20 61 6e 64 | 20 69 74 27 73 20 76 69 |list and| it's vi|
|00004b50| 65 77 43 74 6c 20 20 41 | 6c 6c 20 70 61 72 74 73 |ewCtl A|ll parts|
|00004b60| 20 61 72 65 20 72 65 73 | 69 7a 65 64 2c 20 69 6e | are res|ized, in|
|00004b70| 63 6c 75 64 69 6e 67 20 | 74 68 65 20 73 63 72 6f |cluding |the scro|
|00004b80| 6c 6c 62 61 72 73 2c 0d | 09 2a 2a 09 61 6e 64 20 |llbars,.|.**.and |
|00004b90| 61 63 74 69 76 65 20 69 | 6e 64 69 63 61 74 6f 72 |active i|ndicator|
|00004ba0| 2e 20 2a 2f 0d 0d 76 6f | 69 64 09 09 09 43 4c 4d |. */..vo|id...CLM|
|00004bb0| 6f 76 65 28 4c 69 73 74 | 48 61 6e 64 6c 65 20 6c |ove(List|Handle l|
|00004bc0| 69 73 74 2c 20 73 68 6f | 72 74 20 6e 65 77 48 2c |ist, sho|rt newH,|
|00004bd0| 20 73 68 6f 72 74 20 6e | 65 77 56 29 3b 0d 09 2f | short n|ewV);../|
|00004be0| 2a 0d 09 2a 2a 09 a6 20 | 4d 6f 76 65 20 74 68 65 |*..**.. |Move the|
|00004bf0| 20 63 6f 6e 74 72 6f 6c | 20 61 6e 64 20 72 65 6c | control| and rel|
|00004c00| 61 74 65 64 20 74 68 69 | 6e 67 73 2e 0d 09 2a 2a |ated thi|ngs...**|
|00004c10| 0d 09 2a 2a 09 49 4e 50 | 55 54 3a 09 6c 69 73 74 |..**.INP|UT:.list|
|00004c20| 09 09 4c 69 73 74 20 74 | 6f 20 6d 6f 76 65 2e 0d |..List t|o move..|
|00004c30| 09 2a 2a 09 09 09 6e 65 | 77 48 09 09 4e 65 77 20 |.**...ne|wH..New |
|00004c40| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 6c 6f 63 61 74 |horizont|al locat|
|00004c50| 69 6f 6e 20 66 6f 72 20 | 63 6f 6e 74 72 6f 6c 2e |ion for |control.|
|00004c60| 0d 09 2a 2a 09 09 09 6e | 65 77 56 09 09 4e 65 77 |..**...n|ewV..New|
|00004c70| 20 76 65 72 74 69 63 61 | 6c 20 6c 6f 63 61 74 69 | vertica|l locati|
|00004c80| 6f 6e 20 66 6f 72 20 63 | 6f 6e 74 72 6f 6c 2e 0d |on for c|ontrol..|
|00004c90| 09 2a 2a 0d 09 2a 2a 09 | 54 68 69 73 20 6d 6f 76 |.**..**.|This mov|
|00004ca0| 65 73 20 74 68 65 20 6c | 69 73 74 20 61 6e 64 20 |es the l|ist and |
|00004cb0| 69 74 27 73 20 76 69 65 | 77 43 74 6c 20 20 41 6c |it's vie|wCtl Al|
|00004cc0| 6c 20 70 61 72 74 73 20 | 61 72 65 20 6d 6f 76 65 |l parts |are move|
|00004cd0| 64 2c 20 69 6e 63 6c 75 | 64 69 6e 67 20 74 68 65 |d, inclu|ding the|
|00004ce0| 20 73 63 72 6f 6c 6c 62 | 61 72 73 2c 0d 09 2a 2a | scrollb|ars,..**|
|00004cf0| 09 61 6e 64 20 61 63 74 | 69 76 65 20 69 6e 64 69 |.and act|ive indi|
|00004d00| 63 61 74 6f 72 2e 20 2a | 2f 0d 0d 76 6f 69 64 09 |cator. *|/..void.|
|00004d10| 09 09 43 4c 53 68 6f 77 | 28 4c 69 73 74 48 61 6e |..CLShow|(ListHan|
|00004d20| 64 6c 65 20 6c 69 73 74 | 29 3b 0d 09 2f 2a 0d 09 |dle list|);../*..|
|00004d30| 2a 2a 09 a6 20 53 68 6f | 77 20 74 68 65 20 63 6f |**.. Sho|w the co|
|00004d40| 6e 74 72 6f 6c 20 61 6e | 64 20 72 65 6c 61 74 65 |ntrol an|d relate|
|00004d50| 64 20 74 68 69 6e 67 73 | 2e 0d 09 2a 2a 0d 09 2a |d things|...**..*|
|00004d60| 2a 09 49 4e 50 55 54 3a | 09 6c 69 73 74 09 09 4c |*.INPUT:|.list..L|
|00004d70| 69 73 74 20 74 6f 20 73 | 68 6f 77 2e 0d 09 2a 2a |ist to s|how...**|
|00004d80| 0d 09 2a 2a 09 54 68 69 | 73 20 73 68 6f 77 73 20 |..**.Thi|s shows |
|00004d90| 74 68 65 20 6c 69 73 74 | 20 61 6e 64 20 72 65 6c |the list| and rel|
|00004da0| 61 74 65 64 20 70 61 72 | 74 73 2c 20 69 6e 63 6c |ated par|ts, incl|
|00004db0| 75 64 69 6e 67 20 74 68 | 65 20 73 63 72 6f 6c 6c |uding th|e scroll|
|00004dc0| 62 61 72 73 20 61 6e 64 | 20 61 63 74 69 76 65 20 |bars and| active |
|00004dd0| 69 6e 64 69 63 61 74 6f | 72 2e 20 2a 2f 0d 0d 52 |indicato|r. */..R|
|00004de0| 65 63 74 09 09 09 43 4c | 48 69 64 65 28 4c 69 73 |ect...CL|Hide(Lis|
|00004df0| 74 48 61 6e 64 6c 65 20 | 6c 69 73 74 29 3b 0d 09 |tHandle |list);..|
|00004e00| 2f 2a 0d 09 2a 2a 09 a6 | 20 48 69 64 65 20 74 68 |/*..**..| Hide th|
|00004e10| 65 20 63 6f 6e 74 72 6f | 6c 20 61 6e 64 20 72 65 |e contro|l and re|
|00004e20| 6c 61 74 65 64 20 74 68 | 69 6e 67 73 2e 0d 09 2a |lated th|ings...*|
|00004e30| 2a 0d 09 2a 2a 09 49 4e | 50 55 54 3a 09 6c 69 73 |*..**.IN|PUT:.lis|
|00004e40| 74 09 09 4c 69 73 74 20 | 74 6f 20 68 69 64 65 2e |t..List |to hide.|
|00004e50| 0d 09 2a 2a 0d 09 2a 2a | 09 54 68 69 73 20 68 69 |..**..**|.This hi|
|00004e60| 64 65 73 20 74 68 65 20 | 6c 69 73 74 20 61 6e 64 |des the |list and|
|00004e70| 20 72 65 6c 61 74 65 64 | 20 70 61 72 74 73 2c 20 | related| parts, |
|00004e80| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 65 20 73 63 |includin|g the sc|
|00004e90| 72 6f 6c 6c 62 61 72 73 | 20 61 6e 64 20 61 63 74 |rollbars| and act|
|00004ea0| 69 76 65 20 69 6e 64 69 | 63 61 74 6f 72 2e 20 2a |ive indi|cator. *|
|00004eb0| 2f 0d 0d 76 6f 69 64 09 | 09 09 43 4c 56 49 6e 69 |/..void.|..CLVIni|
|00004ec0| 74 69 61 6c 69 7a 65 28 | 76 6f 69 64 29 3b 0d 09 |tialize(|void);..|
|00004ed0| 2f 2a 0d 09 2a 2a 09 a6 | 20 49 6e 69 74 69 61 6c |/*..**..| Initial|
|00004ee0| 69 7a 65 20 76 61 72 69 | 61 62 6c 65 2d 73 69 7a |ize vari|able-siz|
|00004ef0| 65 64 20 63 65 6c 6c 73 | 20 4c 69 73 74 20 63 6f |ed cells| List co|
|00004f00| 6e 74 72 6f 6c 20 63 6f | 64 65 2e 0d 09 2a 2a 0d |ntrol co|de...**.|
|00004f10| 09 2a 2a 09 43 61 6c 6c | 20 74 68 69 73 20 75 70 |.**.Call| this up|
|00004f20| 6f 6e 20 73 74 61 72 74 | 75 70 20 6f 66 20 61 6e |on start|up of an|
|00004f30| 79 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 68 |y applic|ation th|
|00004f40| 61 74 20 77 61 6e 74 73 | 20 74 6f 20 62 65 20 61 |at wants| to be a|
|00004f50| 62 6c 65 20 74 6f 20 75 | 73 65 20 74 68 65 0d 09 |ble to u|se the..|
|00004f60| 2a 2a 09 76 61 72 69 61 | 62 6c 65 2d 73 69 7a 65 |**.varia|ble-size|
|00004f70| 20 63 65 6c 6c 20 66 65 | 61 74 75 72 65 20 6f 66 | cell fe|ature of|
|00004f80| 20 74 68 65 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f | the Lis|t contro|
|00004f90| 6c 2e 20 20 46 6f 72 20 | 41 70 70 73 54 6f 47 6f |l. For |AppsToGo|
|00004fa0| 2d 63 72 65 61 74 65 64 | 20 4c 69 73 74 20 63 6f |-created| List co|
|00004fb0| 6e 74 72 6f 6c 0d 09 2a | 2a 09 64 65 66 69 6e 69 |ntrol..*|*.defini|
|00004fc0| 74 69 6f 6e 73 20 74 6f | 20 62 65 20 76 61 72 69 |tions to| be vari|
|00004fd0| 61 62 6c 65 2d 73 69 7a | 65 20 61 75 74 6f 6d 61 |able-siz|e automa|
|00004fe0| 74 69 63 61 6c 6c 79 2c | 20 74 68 69 73 20 6d 75 |tically,| this mu|
|00004ff0| 73 74 20 62 65 20 63 61 | 6c 6c 65 64 20 66 69 72 |st be ca|lled fir|
|00005000| 73 74 2e 20 20 59 6f 75 | 20 63 61 6e 0d 09 2a 2a |st. You| can..**|
|00005010| 09 63 61 6c 6c 20 43 4c | 56 56 61 72 69 61 62 6c |.call CL|VVariabl|
|00005020| 65 53 69 7a 65 43 65 6c | 6c 73 20 61 74 20 61 20 |eSizeCel|ls at a |
|00005030| 6c 61 74 65 72 20 74 69 | 6d 65 20 74 6f 20 75 74 |later ti|me to ut|
|00005040| 69 6c 69 7a 65 20 74 68 | 69 73 20 66 65 61 74 75 |ilize th|is featu|
|00005050| 72 65 2c 20 61 73 20 69 | 74 0d 09 2a 2a 09 63 61 |re, as i|t..**.ca|
|00005060| 6c 6c 73 20 43 4c 56 49 | 6e 69 74 69 61 6c 69 7a |lls CLVI|nitializ|
|00005070| 65 2e 0d 09 2a 2a 0d 09 | 2a 2a 0d 09 2a 2a 09 41 |e...**..|**..**.A|
|00005080| 20 6e 75 6d 62 65 72 20 | 6f 66 20 64 65 76 65 6c | number |of devel|
|00005090| 6f 70 65 72 73 20 68 61 | 76 65 20 65 78 70 72 65 |opers ha|ve expre|
|000050a0| 73 73 65 64 20 61 20 64 | 65 73 69 72 65 20 74 6f |ssed a d|esire to|
|000050b0| 20 68 61 76 65 20 74 68 | 65 20 4c 69 73 74 20 4d | have th|e List M|
|000050c0| 61 6e 61 67 65 72 20 73 | 75 70 70 6f 72 74 0d 09 |anager s|upport..|
|000050d0| 2a 2a 09 76 61 72 69 61 | 62 6c 65 2d 73 69 7a 65 |**.varia|ble-size|
|000050e0| 20 63 65 6c 6c 73 2e 20 | 20 49 6e 20 72 65 73 70 | cells. | In resp|
|000050f0| 6f 6e 73 65 20 74 6f 20 | 74 68 69 73 2c 20 74 68 |onse to |this, th|
|00005100| 65 20 4c 69 73 74 20 63 | 6f 6e 74 72 6f 6c 20 68 |e List c|ontrol h|
|00005110| 61 73 20 62 65 65 6e 20 | 65 78 74 65 6e 64 65 64 |as been |extended|
|00005120| 20 74 6f 0d 09 2a 2a 09 | 73 75 70 70 6f 72 74 20 | to..**.|support |
|00005130| 76 61 72 69 61 62 6c 65 | 2d 73 69 7a 65 20 72 6f |variable|-size ro|
|00005140| 77 73 20 61 6e 64 20 63 | 6f 6c 75 6d 6e 73 2e 0d |ws and c|olumns..|
|00005150| 09 2a 2a 0d 09 2a 2a 09 | 54 68 65 20 66 69 72 73 |.**..**.|The firs|
|00005160| 74 20 70 72 6f 62 6c 65 | 6d 20 69 73 20 77 68 65 |t proble|m is whe|
|00005170| 72 65 20 74 6f 20 73 74 | 6f 72 65 20 74 68 65 20 |re to st|ore the |
|00005180| 73 69 7a 65 20 66 6f 72 | 20 65 61 63 68 20 72 6f |size for| each ro|
|00005190| 77 20 61 6e 64 20 63 6f | 6c 75 6d 6e 2e 20 20 54 |w and co|lumn. T|
|000051a0| 68 69 73 0d 09 2a 2a 09 | 69 6d 70 6c 65 6d 65 6e |his..**.|implemen|
|000051b0| 74 61 74 69 6f 6e 20 65 | 78 70 65 63 74 73 20 74 |tation e|xpects t|
|000051c0| 68 65 20 73 69 7a 65 73 | 20 66 6f 72 20 74 68 65 |he sizes| for the|
|000051d0| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 63 6f 6c 75 | individ|ual colu|
|000051e0| 6d 6e 20 77 69 64 74 68 | 73 20 74 6f 20 62 65 20 |mn width|s to be |
|000051f0| 73 74 6f 72 65 64 0d 09 | 2a 2a 09 69 6e 20 72 6f |stored..|**.in ro|
|00005200| 77 20 30 2c 20 63 65 6c | 6c 73 20 31 20 74 68 72 |w 0, cel|ls 1 thr|
|00005210| 6f 75 67 68 20 6e 75 6d | 43 6f 6c 73 2c 20 61 6e |ough num|Cols, an|
|00005220| 64 20 74 68 65 20 69 6e | 64 69 76 69 64 75 61 6c |d the in|dividual|
|00005230| 20 72 6f 77 20 77 69 64 | 74 68 73 20 74 6f 20 62 | row wid|ths to b|
|00005240| 65 20 73 74 6f 72 65 64 | 20 69 6e 0d 09 2a 2a 09 |e stored| in..**.|
|00005250| 63 6f 6c 75 6d 6e 20 30 | 2c 20 72 6f 77 73 20 31 |column 0|, rows 1|
|00005260| 20 74 68 72 6f 75 67 68 | 20 6e 75 6d 52 6f 77 73 | through| numRows|
|00005270| 2e 20 20 54 68 65 20 76 | 61 6c 75 65 73 20 61 72 |. The v|alues ar|
|00005280| 65 20 70 6c 61 63 65 64 | 20 69 6e 20 74 68 65 20 |e placed| in the |
|00005290| 63 65 6c 6c 73 20 69 6e | 20 64 65 63 69 6d 61 6c |cells in| decimal|
|000052a0| 0d 09 2a 2a 09 61 73 63 | 69 69 2e 20 20 28 54 68 |..**.asc|ii. (Th|
|000052b0| 69 73 20 69 73 20 73 6f | 20 74 68 61 74 20 74 68 |is is so| that th|
|000052c0| 65 20 41 70 70 73 54 6f | 47 6f 20 65 64 69 74 6f |e AppsTo|Go edito|
|000052d0| 72 20 63 61 6e 20 65 61 | 73 69 6c 79 20 62 65 20 |r can ea|sily be |
|000052e0| 75 73 65 64 20 74 6f 20 | 63 72 65 61 74 65 20 6c |used to |create l|
|000052f0| 69 73 74 73 0d 09 2a 2a | 09 77 69 74 68 20 76 61 |ists..**|.with va|
|00005300| 72 69 61 62 6c 65 2d 73 | 69 7a 65 20 63 65 6c 6c |riable-s|ize cell|
|00005310| 73 2e 20 20 59 6f 75 20 | 6a 75 73 74 20 65 6e 74 |s. You |just ent|
|00005320| 65 72 20 74 68 65 20 64 | 65 63 69 6d 61 6c 20 61 |er the d|ecimal a|
|00005330| 73 63 69 69 20 76 61 6c | 75 65 20 69 6e 20 74 68 |scii val|ue in th|
|00005340| 65 20 65 64 69 74 6f 72 | 2e 29 0d 09 2a 2a 09 41 |e editor|.)..**.A|
|00005350| 6e 79 20 72 6f 77 20 6f | 72 20 63 6f 6c 75 6d 6e |ny row o|r column|
|00005360| 20 77 69 74 68 6f 75 74 | 20 61 20 64 65 63 69 6d | without| a decim|
|00005370| 61 6c 20 61 73 63 69 69 | 20 65 6e 74 72 79 20 66 |al ascii| entry f|
|00005380| 6f 72 20 74 68 65 20 73 | 69 7a 65 20 77 69 6c 6c |or the s|ize will|
|00005390| 20 67 65 74 20 74 68 65 | 20 72 65 67 75 6c 61 72 | get the| regular|
|000053a0| 0d 09 2a 2a 09 73 69 7a | 65 20 66 6f 72 20 61 20 |..**.siz|e for a |
|000053b0| 63 65 6c 6c 2e 0d 09 2a | 2a 0d 09 2a 2a 09 53 69 |cell...*|*..**.Si|
|000053c0| 6e 63 65 20 72 6f 77 20 | 30 20 61 6e 64 20 63 6f |nce row |0 and co|
|000053d0| 6c 75 6d 6e 20 30 20 61 | 72 65 20 75 73 65 64 20 |lumn 0 a|re used |
|000053e0| 74 6f 20 73 74 6f 72 65 | 20 74 68 65 20 77 69 64 |to store| the wid|
|000053f0| 74 68 73 2c 20 74 68 65 | 73 65 20 63 65 6c 6c 73 |ths, the|se cells|
|00005400| 20 61 72 65 20 6e 6f 74 | 20 61 76 61 69 6c 61 62 | are not| availab|
|00005410| 6c 65 0d 09 2a 2a 09 69 | 6e 20 74 68 65 20 6c 69 |le..**.i|n the li|
|00005420| 73 74 2e 20 20 54 68 65 | 79 20 61 72 65 20 6e 6f |st. The|y are no|
|00005430| 74 20 64 69 73 70 6c 61 | 79 65 64 2c 20 61 6e 64 |t displa|yed, and|
|00005440| 20 79 6f 75 20 63 61 6e | 20 6e 6f 74 20 73 63 72 | you can| not scr|
|00005450| 6f 6c 6c 20 69 6e 74 6f | 20 74 68 65 6d 2e 20 20 |oll into| them. |
|00005460| 44 75 65 20 74 6f 20 74 | 68 69 73 2c 0d 09 2a 2a |Due to t|his,..**|
|00005470| 09 74 68 65 20 6c 69 73 | 74 20 69 73 20 6f 6e 65 |.the lis|t is one|
|00005480| 20 63 6f 6c 75 6d 6e 20 | 6e 61 72 72 6f 77 65 72 | column |narrower|
|00005490| 20 61 6e 64 20 6f 6e 65 | 20 72 6f 77 20 73 68 6f | and one| row sho|
|000054a0| 72 74 65 72 20 74 68 61 | 6e 20 61 20 72 65 67 75 |rter tha|n a regu|
|000054b0| 6c 61 72 20 6c 69 73 74 | 2e 0d 09 2a 2a 0d 09 2a |lar list|...**..*|
|000054c0| 2a 09 54 68 65 20 76 61 | 72 69 61 62 6c 65 2d 73 |*.The va|riable-s|
|000054d0| 69 7a 65 20 6c 69 73 74 | 20 65 78 70 65 63 74 73 |ize list| expects|
|000054e0| 20 74 68 65 20 64 61 74 | 61 42 6f 75 6e 64 73 20 | the dat|aBounds |
|000054f0| 75 70 70 65 72 2d 6c 65 | 66 74 20 74 6f 20 62 65 |upper-le|ft to be|
|00005500| 20 30 2c 30 2e 20 20 41 | 6e 79 20 6f 74 68 65 72 | 0,0. A|ny other|
|00005510| 0d 09 2a 2a 09 75 70 70 | 65 72 2d 6c 65 66 74 20 |..**.upp|er-left |
|00005520| 66 6f 72 20 74 68 65 20 | 64 61 74 61 42 6f 75 6e |for the |dataBoun|
|00005530| 64 73 20 77 69 6c 6c 20 | 63 61 75 73 65 20 74 68 |ds will |cause th|
|00005540| 65 20 76 61 72 69 61 62 | 6c 65 2d 73 69 7a 65 20 |e variab|le-size |
|00005550| 6c 69 73 74 20 74 6f 20 | 6d 69 73 62 65 68 61 76 |list to |misbehav|
|00005560| 65 2e 20 20 0d 09 2a 2a | 09 41 20 64 61 74 61 42 |e. ..**|.A dataB|
|00005570| 6f 75 6e 64 73 20 6f 74 | 68 65 72 20 74 68 61 6e |ounds ot|her than|
|00005580| 20 30 2c 30 20 69 73 20 | 76 65 72 79 20 72 61 72 | 0,0 is |very rar|
|00005590| 65 2c 20 61 6e 64 20 75 | 6e 6e 65 63 65 73 73 61 |e, and u|nnecessa|
|000055a0| 72 79 2c 20 73 6f 20 69 | 74 20 73 65 65 6d 65 64 |ry, so i|t seemed|
|000055b0| 20 62 65 74 74 65 72 0d | 09 2a 2a 09 74 6f 20 6e | better.|.**.to n|
|000055c0| 6f 74 20 68 61 76 65 20 | 74 68 65 20 63 6f 64 65 |ot have |the code|
|000055d0| 20 74 6f 20 73 75 70 70 | 6f 72 74 20 69 74 2c 20 | to supp|ort it, |
|000055e0| 74 68 61 6e 20 74 6f 20 | 63 6f 64 65 20 66 6f 72 |than to |code for|
|000055f0| 20 61 20 66 65 61 74 75 | 72 65 20 61 6c 6d 6f 73 | a featu|re almos|
|00005600| 74 20 6e 65 76 65 72 20 | 75 73 65 64 2e 0d 09 2a |t never |used...*|
|00005610| 2a 0d 09 2a 2a 09 42 69 | 74 20 31 34 20 6f 66 20 |*..**.Bi|t 14 of |
|00005620| 74 68 65 20 6d 6f 64 65 | 20 66 69 65 6c 64 20 6e |the mode| field n|
|00005630| 65 65 64 73 20 74 6f 20 | 62 65 20 73 65 74 20 74 |eeds to |be set t|
|00005640| 6f 20 74 72 75 65 20 66 | 6f 72 20 74 68 65 20 6c |o true f|or the l|
|00005650| 69 73 74 20 74 6f 20 62 | 65 20 63 6f 6e 76 65 72 |ist to b|e conver|
|00005660| 74 65 64 20 74 6f 0d 09 | 2a 2a 09 61 20 76 61 72 |ted to..|**.a var|
|00005670| 69 61 62 6c 65 2d 73 69 | 7a 65 20 6c 69 73 74 2e |iable-si|ze list.|
|00005680| 20 20 41 6c 73 6f 2c 20 | 43 4c 56 49 6e 69 74 69 | Also, |CLVIniti|
|00005690| 61 6c 69 7a 65 28 29 20 | 68 61 73 20 74 6f 20 62 |alize() |has to b|
|000056a0| 65 20 63 61 6c 6c 65 64 | 20 61 74 20 73 6f 6d 65 |e called| at some|
|000056b0| 20 74 69 6d 65 2c 20 6f | 72 20 65 6c 73 65 0d 09 | time, o|r else..|
|000056c0| 2a 2a 09 74 68 65 20 66 | 72 61 6d 65 77 6f 72 6b |**.the f|ramework|
|000056d0| 20 77 69 6c 6c 20 63 72 | 65 61 74 65 20 74 68 65 | will cr|eate the|
|000056e0| 20 6c 69 73 74 20 61 73 | 20 61 20 72 65 67 75 6c | list as| a regul|
|000056f0| 61 72 20 6c 69 73 74 2e | 20 20 28 53 74 61 72 74 |ar list.| (Start|
|00005700| 2e 63 20 69 73 20 61 20 | 67 6f 6f 64 20 70 6c 61 |.c is a |good pla|
|00005710| 63 65 2e 29 0d 09 2a 2a | 0d 09 2a 2a 09 46 6f 72 |ce.)..**|..**.For|
|00005720| 20 74 68 65 20 6d 6f 73 | 74 20 70 61 72 74 2c 20 | the mos|t part, |
|00005730| 74 68 65 20 4c 69 73 74 | 20 63 6f 6e 74 72 6f 6c |the List| control|
|00005740| 20 69 73 20 6d 61 6e 61 | 67 65 64 20 6a 75 73 74 | is mana|ged just|
|00005750| 20 6c 69 6b 65 20 74 68 | 65 20 72 65 67 75 6c 61 | like th|e regula|
|00005760| 72 20 4c 69 73 74 20 63 | 6f 6e 74 72 6f 6c 2e 0d |r List c|ontrol..|
|00005770| 09 2a 2a 09 49 66 20 79 | 6f 75 20 6e 65 65 64 20 |.**.If y|ou need |
|00005780| 74 6f 20 61 63 63 65 73 | 73 20 74 68 65 20 4c 69 |to acces|s the Li|
|00005790| 73 74 20 69 74 73 65 6c | 66 2c 20 69 74 20 69 73 |st itsel|f, it is|
|000057a0| 20 73 74 6f 72 65 64 20 | 69 6e 20 74 68 65 20 72 | stored |in the r|
|000057b0| 65 66 43 6f 6e 20 6f 66 | 20 74 68 65 20 4c 69 73 |efCon of| the Lis|
|000057c0| 74 20 63 6f 6e 74 72 6f | 6c 2e 0d 09 2a 2a 09 48 |t contro|l...**.H|
|000057d0| 6f 77 65 76 65 72 2c 20 | 73 69 6e 63 65 20 74 68 |owever, |since th|
|000057e0| 65 20 4c 69 73 74 20 4d | 61 6e 61 67 65 72 20 63 |e List M|anager c|
|000057f0| 61 6c 6c 73 20 61 72 65 | 6e 27 74 20 65 78 70 65 |alls are|n't expe|
|00005800| 63 74 69 6e 67 20 74 68 | 65 20 6c 69 73 74 20 74 |cting th|e list t|
|00005810| 6f 20 62 65 20 6f 66 20 | 76 61 72 69 61 62 6c 65 |o be of |variable|
|00005820| 2d 73 69 7a 65 0d 09 2a | 2a 09 63 65 6c 6c 73 2c |-size..*|*.cells,|
|00005830| 20 79 6f 75 20 63 61 6e | 27 74 20 6d 61 6b 65 20 | you can|'t make |
|00005840| 61 6c 6c 20 6f 66 20 74 | 68 65 20 63 61 6c 6c 73 |all of t|he calls|
|00005850| 20 74 6f 20 74 68 65 20 | 4c 69 73 74 20 4d 61 6e | to the |List Man|
|00005860| 61 67 65 72 20 79 6f 75 | 20 77 6f 75 6c 64 20 6e |ager you| would n|
|00005870| 6f 72 6d 61 6c 6c 79 20 | 6d 61 6b 65 2e 0d 09 2a |ormally |make...*|
|00005880| 2a 0d 09 2a 2a 09 49 66 | 20 79 6f 75 20 63 72 65 |*..**.If| you cre|
|00005890| 61 74 65 20 61 20 72 65 | 67 75 6c 61 72 20 6c 69 |ate a re|gular li|
|000058a0| 73 74 2c 20 61 6e 64 20 | 74 68 65 6e 20 70 6c 61 |st, and |then pla|
|000058b0| 63 65 20 64 65 63 69 6d | 61 6c 20 61 73 63 69 69 |ce decim|al ascii|
|000058c0| 20 76 61 6c 75 65 73 20 | 69 6e 20 72 6f 77 20 30 | values |in row 0|
|000058d0| 20 61 6e 64 0d 09 2a 2a | 09 63 6f 6c 75 6d 6e 20 | and..**|.column |
|000058e0| 30 20 28 77 68 65 72 65 | 20 6e 65 65 64 65 64 29 |0 (where| needed)|
|000058f0| 2c 20 79 6f 75 20 63 61 | 6e 20 74 68 65 6e 20 64 |, you ca|n then d|
|00005900| 69 72 65 63 74 6c 79 20 | 63 61 6c 6c 20 43 4c 56 |irectly |call CLV|
|00005910| 56 61 72 69 61 62 6c 65 | 53 69 7a 65 43 65 6c 6c |Variable|SizeCell|
|00005920| 73 28 29 20 66 6f 72 20 | 74 68 61 74 0d 09 2a 2a |s() for |that..**|
|00005930| 09 6c 69 73 74 2c 20 61 | 6e 64 20 69 74 20 77 69 |.list, a|nd it wi|
|00005940| 6c 6c 20 62 65 20 63 6f | 6e 76 65 72 74 65 64 2e |ll be co|nverted.|
|00005950| 20 20 28 49 66 20 79 6f | 75 20 63 61 6c 6c 20 43 | (If yo|u call C|
|00005960| 4c 56 56 61 72 69 61 62 | 6c 65 53 69 7a 65 43 65 |LVVariab|leSizeCe|
|00005970| 6c 6c 73 28 29 20 64 69 | 72 65 63 74 6c 79 2c 20 |lls() di|rectly, |
|00005980| 79 6f 75 0d 09 2a 2a 09 | 64 6f 6e 27 74 20 61 63 |you..**.|don't ac|
|00005990| 74 75 61 6c 6c 79 20 6e | 65 65 64 20 74 6f 20 63 |tually n|eed to c|
|000059a0| 61 6c 6c 20 43 4c 56 49 | 6e 69 74 69 61 6c 69 7a |all CLVI|nitializ|
|000059b0| 65 28 29 2c 20 61 73 20 | 69 74 20 64 6f 65 73 20 |e(), as |it does |
|000059c0| 74 68 69 73 20 66 6f 72 | 20 79 6f 75 2e 29 0d 09 |this for| you.)..|
|000059d0| 2a 2a 0d 09 2a 2a 09 42 | 65 6c 6f 77 20 61 72 65 |**..**.B|elow are|
|000059e0| 20 74 68 65 20 4c 69 73 | 74 20 4d 61 6e 61 67 65 | the Lis|t Manage|
|000059f0| 72 20 63 61 6c 6c 73 2c | 20 61 6e 64 20 68 6f 77 |r calls,| and how|
|00005a00| 20 74 68 65 79 20 73 68 | 6f 75 6c 64 20 62 65 20 | they sh|ould be |
|00005a10| 68 61 6e 64 6c 65 64 20 | 77 68 65 6e 20 75 73 69 |handled |when usi|
|00005a20| 6e 67 20 61 0d 09 2a 2a | 09 76 61 72 69 61 62 6c |ng a..**|.variabl|
|00005a30| 65 2d 73 69 7a 65 20 6c | 69 73 74 3a 0d 09 2a 2a |e-size l|ist:..**|
|00005a40| 0d 09 2a 2a 0d 09 2a 2a | 09 4c 41 63 74 69 76 61 |..**..**|.LActiva|
|00005a50| 74 65 3a 0d 09 2a 2a 09 | 09 43 61 6c 6c 20 43 4c |te:..**.|.Call CL|
|00005a60| 41 63 74 69 76 61 74 65 | 28 29 2e 0d 09 2a 2a 0d |Activate|()...**.|
|00005a70| 09 2a 2a 09 4c 41 64 64 | 43 6f 6c 75 6d 6e 3a 0d |.**.LAdd|Column:.|
|00005a80| 09 2a 2a 09 09 43 61 6c | 6c 20 43 4c 56 41 64 64 |.**..Cal|l CLVAdd|
|00005a90| 43 6f 6c 75 6d 6e 28 29 | 2e 0d 09 2a 2a 0d 09 2a |Column()|...**..*|
|00005aa0| 2a 09 4c 41 64 64 52 6f | 77 3a 0d 09 2a 2a 09 09 |*.LAddRo|w:..**..|
|00005ab0| 43 61 6c 6c 20 43 4c 56 | 41 64 64 52 6f 77 28 29 |Call CLV|AddRow()|
|00005ac0| 2e 0d 09 2a 2a 0d 09 2a | 2a 09 4c 41 64 64 54 6f |...**..*|*.LAddTo|
|00005ad0| 43 65 6c 6c 3a 0d 09 2a | 2a 09 09 4f 6b 61 79 20 |Cell:..*|*..Okay |
|00005ae0| 74 6f 20 63 61 6c 6c 2e | 20 20 43 65 6c 6c 20 77 |to call.| Cell w|
|00005af0| 6f 6e 27 74 20 62 65 20 | 64 72 61 77 6e 2c 20 74 |on't be |drawn, t|
|00005b00| 68 6f 75 67 68 2e 20 20 | 53 74 61 6e 64 61 72 64 |hough. |Standard|
|00005b10| 20 6c 69 73 74 20 64 72 | 61 77 69 6e 67 20 69 73 | list dr|awing is|
|00005b20| 20 64 69 73 61 62 6c 65 | 64 0d 09 2a 2a 09 09 77 | disable|d..**..w|
|00005b30| 68 65 6e 20 75 73 69 6e | 67 20 76 61 72 69 61 62 |hen usin|g variab|
|00005b40| 6c 65 2d 73 69 7a 65 20 | 63 65 6c 6c 20 6d 6f 64 |le-size |cell mod|
|00005b50| 65 2e 20 20 43 61 6c 6c | 20 43 4c 56 44 72 61 77 |e. Call| CLVDraw|
|00005b60| 28 29 20 61 66 74 65 72 | 77 61 72 64 73 20 74 6f |() after|wards to|
|00005b70| 20 64 72 61 77 20 74 68 | 65 20 63 65 6c 6c 2e 0d | draw th|e cell..|
|00005b80| 09 2a 2a 0d 09 2a 2a 09 | 4c 41 75 74 6f 53 63 72 |.**..**.|LAutoScr|
|00005b90| 6f 6c 6c 3a 0d 09 2a 2a | 09 09 43 61 6c 6c 20 43 |oll:..**|..Call C|
|00005ba0| 4c 56 41 75 74 6f 53 63 | 72 6f 6c 6c 28 29 2e 0d |LVAutoSc|roll()..|
|00005bb0| 09 2a 2a 0d 09 2a 2a 09 | 4c 43 65 6c 6c 53 69 7a |.**..**.|LCellSiz|
|00005bc0| 65 3a 0d 09 2a 2a 09 09 | 4e 65 77 20 6d 65 61 6e |e:..**..|New mean|
|00005bd0| 69 6e 67 2e 20 20 59 6f | 75 20 63 61 6e 20 73 65 |ing. Yo|u can se|
|00005be0| 74 20 74 68 65 20 73 69 | 7a 65 20 6f 66 20 61 20 |t the si|ze of a |
|00005bf0| 63 6f 6c 75 6d 6e 20 6f | 72 20 72 6f 77 2e 20 20 |column o|r row. |
|00005c00| 54 6f 20 64 6f 2c 20 64 | 6f 20 74 68 65 20 66 6f |To do, d|o the fo|
|00005c10| 6c 6c 6f 77 69 6e 67 3a | 0d 09 2a 2a 09 09 09 31 |llowing:|..**...1|
|00005c20| 29 09 4c 47 65 74 43 65 | 6c 6c 28 29 20 66 6f 72 |).LGetCe|ll() for|
|00005c30| 20 74 68 65 20 72 6f 77 | 20 6f 72 20 63 6f 6c 75 | the row| or colu|
|00005c40| 6d 6e 20 77 69 64 74 68 | 20 74 6f 20 63 68 61 6e |mn width| to chan|
|00005c50| 67 65 2e 20 20 45 78 61 | 6d 70 6c 65 3a 0d 09 2a |ge. Exa|mple:..*|
|00005c60| 2a 09 09 09 09 09 46 6f | 72 20 63 6f 6c 75 6d 6e |*.....Fo|r column|
|00005c70| 20 33 2c 0d 09 2a 2a 09 | 09 09 09 09 09 73 68 6f | 3,..**.|.....sho|
|00005c80| 72 74 09 6c 65 6e 2c 20 | 6c 6f 63 53 69 7a 65 5b |rt.len, |locSize[|
|00005c90| 32 5d 3b 0d 09 2a 2a 09 | 09 09 09 09 09 50 6f 69 |2];..**.|.....Poi|
|00005ca0| 6e 74 09 63 65 6c 6c 3b | 0d 09 2a 2a 0d 09 2a 2a |nt.cell;|..**..**|
|00005cb0| 09 09 09 09 09 09 6c 65 | 6e 20 3d 20 32 20 2a 20 |......le|n = 2 * |
|00005cc0| 73 69 7a 65 6f 66 28 73 | 68 6f 72 74 29 3b 0d 09 |sizeof(s|hort);..|
|00005cd0| 2a 2a 09 09 09 09 09 09 | 63 65 6c 6c 2e 68 20 3d |**......|cell.h =|
|00005ce0| 20 33 3b 0d 09 2a 2a 09 | 09 09 09 09 09 63 65 6c | 3;..**.|.....cel|
|00005cf0| 6c 2e 76 20 3d 20 30 3b | 0d 09 2a 2a 09 09 09 09 |l.v = 0;|..**....|
|00005d00| 09 09 4c 47 65 74 43 65 | 6c 6c 28 6c 6f 63 53 69 |..LGetCe|ll(locSi|
|00005d10| 7a 65 2c 20 26 6c 65 6e | 2c 20 63 65 6c 6c 2c 20 |ze, &len|, cell, |
|00005d20| 6c 69 73 74 29 3b 0d 09 | 2a 2a 09 09 09 32 29 09 |list);..|**...2).|
|00005d30| 53 65 74 20 74 68 65 20 | 73 69 7a 65 20 28 32 6e |Set the |size (2n|
|00005d40| 64 20 77 6f 72 64 29 20 | 74 6f 20 6e 65 77 20 73 |d word) |to new s|
|00005d50| 69 7a 65 20 28 6c 6f 63 | 53 69 7a 65 5b 31 5d 20 |ize (loc|Size[1] |
|00005d60| 3d 20 6e 65 77 53 69 7a | 65 29 2e 0d 09 2a 2a 09 |= newSiz|e)...**.|
|00005d70| 09 09 33 29 09 4c 53 65 | 74 43 65 6c 6c 28 6c 6f |..3).LSe|tCell(lo|
|00005d80| 63 53 69 7a 65 2c 20 6c | 65 6e 2c 20 63 65 6c 6c |cSize, l|en, cell|
|00005d90| 2c 20 6c 69 73 74 29 3b | 0d 09 2a 2a 09 09 09 34 |, list);|..**...4|
|00005da0| 29 09 43 4c 56 41 64 6a | 75 73 74 43 65 6c 6c 4c |).CLVAdj|ustCellL|
|00005db0| 6f 63 73 28 6c 69 73 74 | 29 0d 09 2a 2a 09 09 09 |ocs(list|)..**...|
|00005dc0| 35 29 09 43 4c 56 55 70 | 64 61 74 65 28 6c 69 73 |5).CLVUp|date(lis|
|00005dd0| 74 29 0d 09 2a 2a 0d 09 | 2a 2a 09 4c 43 6c 69 63 |t)..**..|**.LClic|
|00005de0| 6b 3a 0d 09 2a 2a 09 09 | 43 61 6c 6c 20 43 4c 56 |k:..**..|Call CLV|
|00005df0| 43 6c 69 63 6b 28 29 2e | 0d 09 2a 2a 0d 09 2a 2a |Click().|..**..**|
|00005e00| 09 4c 43 6c 72 43 65 6c | 6c 3a 0d 09 2a 2a 09 09 |.LClrCel|l:..**..|
|00005e10| 4f 6b 61 79 20 74 6f 20 | 63 61 6c 6c 2e 20 20 43 |Okay to |call. C|
|00005e20| 65 6c 6c 20 77 6f 6e 27 | 74 20 62 65 20 64 72 61 |ell won'|t be dra|
|00005e30| 77 6e 2c 20 74 68 6f 75 | 67 68 2e 20 20 53 74 61 |wn, thou|gh. Sta|
|00005e40| 6e 64 61 72 64 20 6c 69 | 73 74 20 64 72 61 77 69 |ndard li|st drawi|
|00005e50| 6e 67 20 69 73 20 64 69 | 73 61 62 6c 65 64 0d 09 |ng is di|sabled..|
|00005e60| 2a 2a 09 09 77 68 65 6e | 20 75 73 69 6e 67 20 76 |**..when| using v|
|00005e70| 61 72 69 61 62 6c 65 2d | 73 69 7a 65 20 63 65 6c |ariable-|size cel|
|00005e80| 6c 20 6d 6f 64 65 2e 20 | 20 43 61 6c 6c 20 43 4c |l mode. | Call CL|
|00005e90| 56 44 72 61 77 28 29 20 | 61 66 74 65 72 77 61 72 |VDraw() |afterwar|
|00005ea0| 64 73 20 74 6f 20 64 72 | 61 77 20 74 68 65 20 63 |ds to dr|aw the c|
|00005eb0| 65 6c 6c 2e 0d 09 2a 2a | 0d 09 2a 2a 09 4c 44 65 |ell...**|..**.LDe|
|00005ec0| 6c 43 6f 6c 75 6d 6e 3a | 0d 09 2a 2a 09 09 43 61 |lColumn:|..**..Ca|
|00005ed0| 6c 6c 20 4c 44 65 6c 43 | 6f 6c 75 6d 6e 28 29 2c |ll LDelC|olumn(),|
|00005ee0| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 43 4c 56 | followe|d by CLV|
|00005ef0| 41 64 6a 75 73 74 43 65 | 6c 6c 4c 6f 63 73 28 29 |AdjustCe|llLocs()|
|00005f00| 20 61 6e 64 20 43 4c 56 | 55 70 64 61 74 65 28 29 | and CLV|Update()|
|00005f10| 2e 0d 09 2a 2a 0d 09 2a | 2a 09 4c 44 65 6c 52 6f |...**..*|*.LDelRo|
|00005f20| 77 3a 0d 09 2a 2a 09 09 | 43 61 6c 6c 20 4c 44 65 |w:..**..|Call LDe|
|00005f30| 6c 52 6f 77 28 29 2c 20 | 66 6f 6c 6c 6f 77 65 64 |lRow(), |followed|
|00005f40| 20 62 79 20 43 4c 56 41 | 64 6a 75 73 74 43 65 6c | by CLVA|djustCel|
|00005f50| 6c 4c 6f 63 73 28 29 20 | 61 6e 64 20 43 4c 56 55 |lLocs() |and CLVU|
|00005f60| 70 64 61 74 65 28 29 2e | 0d 09 2a 2a 0d 09 2a 2a |pdate().|..**..**|
|00005f70| 09 4c 44 69 73 70 6f 73 | 65 3a 0d 09 2a 2a 09 09 |.LDispos|e:..**..|
|00005f80| 44 6f 6e 27 74 20 63 61 | 6c 6c 20 69 74 2e 20 20 |Don't ca|ll it. |
|00005f90| 44 69 73 70 6f 73 65 20 | 62 79 20 44 69 73 70 6f |Dispose |by Dispo|
|00005fa0| 73 65 43 6f 6e 74 72 6f | 6c 28 43 4c 56 69 65 77 |seContro|l(CLView|
|00005fb0| 46 72 6f 6d 4c 69 73 74 | 28 6c 69 73 74 29 29 2e |FromList|(list)).|
|00005fc0| 0d 09 2a 2a 0d 09 2a 2a | 09 4c 44 6f 44 72 61 77 |..**..**|.LDoDraw|
|00005fd0| 3a 0d 09 2a 2a 09 09 44 | 6f 6e 27 74 20 63 61 6c |:..**..D|on't cal|
|00005fe0| 6c 20 69 74 2e 20 20 54 | 68 65 20 76 61 72 69 61 |l it. T|he varia|
|00005ff0| 62 6c 65 2d 73 69 7a 65 | 64 20 63 6f 6e 74 72 6f |ble-size|d contro|
|00006000| 6c 20 73 68 6f 75 6c 64 | 20 61 6c 77 61 79 73 20 |l should| always |
|00006010| 68 61 76 65 20 64 6f 44 | 72 61 77 20 66 61 6c 73 |have doD|raw fals|
|00006020| 65 2e 0d 09 2a 2a 09 09 | 28 59 6f 75 20 63 61 6e |e...**..|(You can|
|00006030| 20 68 69 64 65 20 74 68 | 65 20 6c 69 73 74 20 62 | hide th|e list b|
|00006040| 79 20 6d 61 6b 69 6e 67 | 20 74 68 65 20 63 6f 6e |y making| the con|
|00006050| 74 72 6f 6c 20 69 6e 76 | 69 73 69 62 6c 65 2e 29 |trol inv|isible.)|
|00006060| 0d 09 2a 2a 0d 09 2a 2a | 09 4c 44 72 61 77 3a 0d |..**..**|.LDraw:.|
|00006070| 09 2a 2a 09 09 43 61 6c | 6c 20 43 4c 56 44 72 61 |.**..Cal|l CLVDra|
|00006080| 77 28 29 2e 0d 09 2a 2a | 0d 09 2a 2a 09 4c 46 69 |w()...**|..**.LFi|
|00006090| 6e 64 3a 0d 09 2a 2a 09 | 09 4f 6b 61 79 20 74 6f |nd:..**.|.Okay to|
|000060a0| 20 63 61 6c 6c 2e 0d 09 | 2a 2a 0d 09 2a 2a 09 4c | call...|**..**.L|
|000060b0| 47 65 74 43 65 6c 6c 3a | 0d 09 2a 2a 09 09 4f 6b |GetCell:|..**..Ok|
|000060c0| 61 79 20 74 6f 20 63 61 | 6c 6c 2e 0d 09 2a 2a 0d |ay to ca|ll...**.|
|000060d0| 09 2a 2a 09 4c 47 65 74 | 53 65 6c 65 63 74 3a 0d |.**.LGet|Select:.|
|000060e0| 09 2a 2a 09 09 4f 6b 61 | 79 20 74 6f 20 63 61 6c |.**..Oka|y to cal|
|000060f0| 6c 2e 0d 09 2a 2a 0d 09 | 2a 2a 09 4c 4c 61 73 74 |l...**..|**.LLast|
|00006100| 43 6c 69 63 6b 3a 0d 09 | 2a 2a 09 09 4f 6b 61 79 |Click:..|**..Okay|
|00006110| 20 74 6f 20 63 61 6c 6c | 2e 0d 09 2a 2a 0d 09 2a | to call|...**..*|
|00006120| 2a 09 4c 4e 65 78 74 43 | 65 6c 6c 3a 0d 09 2a 2a |*.LNextC|ell:..**|
|00006130| 09 09 4f 6b 61 79 20 74 | 6f 20 63 61 6c 6c 2e 0d |..Okay t|o call..|
|00006140| 09 2a 2a 0d 09 2a 2a 09 | 4c 52 65 63 74 3a 0d 09 |.**..**.|LRect:..|
|00006150| 2a 2a 09 09 43 61 6c 6c | 20 43 4c 56 47 65 74 43 |**..Call| CLVGetC|
|00006160| 65 6c 6c 49 6e 66 6f 28 | 29 2e 0d 09 2a 2a 09 09 |ellInfo(|)...**..|
|00006170| 49 74 27 73 20 6f 76 65 | 72 6b 69 6c 6c 2c 20 73 |It's ove|rkill, s|
|00006180| 69 6e 63 65 20 69 74 20 | 67 65 74 73 20 65 76 65 |ince it |gets eve|
|00006190| 72 79 74 68 69 6e 67 2c | 20 62 75 74 20 74 6f 75 |rything,| but tou|
|000061a0| 67 68 2e 20 20 54 68 65 | 72 65 20 61 72 65 6e 27 |gh. The|re aren'|
|000061b0| 74 20 74 6f 6f 20 6d 61 | 6e 79 0d 09 2a 2a 09 09 |t too ma|ny..**..|
|000061c0| 6f 63 63 61 73 69 6f 6e | 73 20 66 6f 72 20 74 68 |occasion|s for th|
|000061d0| 65 20 61 70 70 20 74 6f | 20 67 65 74 20 74 68 65 |e app to| get the|
|000061e0| 20 63 65 6c 6c 20 72 65 | 63 74 2c 20 73 6f 20 49 | cell re|ct, so I|
|000061f0| 27 6d 20 6e 6f 74 20 67 | 6f 69 6e 67 20 74 6f 20 |'m not g|oing to |
|00006200| 68 61 76 65 20 61 6e 6f | 74 68 65 72 0d 09 2a 2a |have ano|ther..**|
|00006210| 09 09 63 61 6c 6c 20 74 | 6f 20 64 6f 20 69 74 2e |..call t|o do it.|
|00006220| 0d 09 2a 2a 0d 09 2a 2a | 09 4c 53 63 72 6f 6c 6c |..**..**|.LScroll|
|00006230| 3a 0d 09 2a 2a 09 09 44 | 6f 6e 27 74 20 63 61 6c |:..**..D|on't cal|
|00006240| 6c 2e 0d 09 2a 2a 0d 09 | 2a 2a 09 4c 53 65 61 72 |l...**..|**.LSear|
|00006250| 63 68 3a 0d 09 2a 2a 09 | 09 4f 6b 61 79 20 74 6f |ch:..**.|.Okay to|
|00006260| 20 63 61 6c 6c 2e 0d 09 | 2a 2a 0d 09 2a 2a 09 4c | call...|**..**.L|
|00006270| 53 65 74 43 65 6c 6c 3a | 0d 09 2a 2a 09 09 4f 6b |SetCell:|..**..Ok|
|00006280| 61 79 20 74 6f 20 63 61 | 6c 6c 2e 20 20 43 65 6c |ay to ca|ll. Cel|
|00006290| 6c 20 77 6f 6e 27 74 20 | 62 65 20 64 72 61 77 6e |l won't |be drawn|
|000062a0| 2c 20 74 68 6f 75 67 68 | 2e 20 20 53 74 61 6e 64 |, though|. Stand|
|000062b0| 61 72 64 20 6c 69 73 74 | 20 64 72 61 77 69 6e 67 |ard list| drawing|
|000062c0| 20 69 73 20 64 69 73 61 | 62 6c 65 64 0d 09 2a 2a | is disa|bled..**|
|000062d0| 09 09 77 68 65 6e 20 75 | 73 69 6e 67 20 76 61 72 |..when u|sing var|
|000062e0| 69 61 62 6c 65 2d 73 69 | 7a 65 20 63 65 6c 6c 20 |iable-si|ze cell |
|000062f0| 6d 6f 64 65 2e 20 20 43 | 61 6c 6c 20 43 4c 56 44 |mode. C|all CLVD|
|00006300| 72 61 77 28 29 20 61 66 | 74 65 72 77 61 72 64 73 |raw() af|terwards|
|00006310| 20 74 6f 20 64 72 61 77 | 20 74 68 65 20 63 65 6c | to draw| the cel|
|00006320| 6c 2e 0d 09 2a 2a 0d 09 | 2a 2a 09 4c 53 65 74 53 |l...**..|**.LSetS|
|00006330| 65 6c 65 63 74 3a 0d 09 | 2a 2a 09 09 43 61 6c 6c |elect:..|**..Call|
|00006340| 20 43 4c 56 53 65 74 53 | 65 6c 65 63 74 28 29 2e | CLVSetS|elect().|
|00006350| 0d 09 2a 2a 0d 09 2a 2a | 09 4c 55 70 64 61 74 65 |..**..**|.LUpdate|
|00006360| 3a 0d 09 2a 2a 09 09 43 | 61 6c 6c 20 43 4c 56 55 |:..**..C|all CLVU|
|00006370| 70 64 61 74 65 0d 09 2a | 2f 0d 0d 76 6f 69 64 09 |pdate..*|/..void.|
|00006380| 09 09 43 4c 56 56 61 72 | 69 61 62 6c 65 53 69 7a |..CLVVar|iableSiz|
|00006390| 65 43 65 6c 6c 73 28 4c | 69 73 74 48 61 6e 64 6c |eCells(L|istHandl|
|000063a0| 65 20 6c 69 73 74 29 3b | 0d 09 2f 2a 0d 09 2a 2a |e list);|../*..**|
|000063b0| 09 a6 20 43 6f 6e 76 65 | 72 74 20 61 20 4c 69 73 |.. Conve|rt a Lis|
|000063c0| 74 20 63 6f 6e 74 72 6f | 6c 20 74 6f 20 6f 6e 65 |t contro|l to one|
|000063d0| 20 74 68 61 74 20 68 61 | 73 20 76 61 72 69 61 62 | that ha|s variab|
|000063e0| 6c 65 20 73 69 7a 65 20 | 72 6f 77 73 20 61 6e 64 |le size |rows and|
|000063f0| 20 63 6f 6c 75 6d 6e 73 | 2e 0d 09 2a 2a 0d 09 2a | columns|...**..*|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.